Project

General

Profile

Task #1119

Updated by Alex Afanasyev almost 11 years ago

Scheduler interface specification: 

     class Scheduler 
     { 
     public: 
       typedef function<void()> Event; 
    
       Scheduler(boost::asio::io_service& ioService); 
    
       /** 
        * \brief Schedule one time event after the specified delay 
        * \returns EventId that can Soon spec for scheduler be used to cancel the scheduled event 
        */ 
       EventId 
       scheduleEvent(const time::Duration& after, const Event& event); 
    
       /** 
        * \brief Schedule periodic event that should be fired every specified period. 
        *          First event will be fired after the specified delay. 
        * \returns EventId that can be used to cancel the scheduled event 
        */ 
       EventId 
       schedulePeriodicEvent(const time::Duration& after, 
                             const time::Duration& period, 
                             const Event& event); 
      
       /** 
        * \brief Cancel scheduled event 
        */ 
       void 
       cancelEvent(const EventId& eventId); 
     }; here

Back