8 #ifndef __WVDAILYEVENT_H 9 #define __WVDAILYEVENT_H 44 WvDailyEvent(
int _first_hour,
int _num_per_day=0,
bool _skip_first=
true );
66 void configure(
int _first_hour,
int _num_per_day=0,
bool _skip_first=
true );
91 const char *wstype()
const {
return "WvDailyEvent"; }
void set_num_per_day(int _num_per_day)
Set number of times per day the event should occur - ONLY FOR TESTING!
virtual void pre_select(SelectInfo &si)
Munges SelectInfo such that the stream will select when the time is right for the event to occur...
Unified support for streams, that is, sequences of bytes that may or may not be ready for read/write ...
the data structure used by pre_select()/post_select() and internally by select(). ...
virtual bool post_select(SelectInfo &si)
post_select() is called after ::select(), and returns true if this object is now ready.
A simple class that can trigger an event on a timed basis.
void configure(int _first_hour, int _num_per_day=0, bool _skip_first=true)
Modifies the first hour in which the event should occur and the number of times the event should occu...
time_t next_event() const
return the time when the next event will occur
void set_hour(int h)
Modifies the first hour in which the event should occur and leaves the number of times per day unmodi...
WvDailyEvent(int _first_hour, int _num_per_day=0, bool _skip_first=true)
Constructs WvDailyEvent.