18 #define _utimer_hpp_ 1 24 #include <ubit/uobject.hpp> 49 UTimer(
bool auto_delete =
true);
55 UTimer(
unsigned long delay,
int ntimes,
bool auto_delete =
true);
83 virtual void start(
unsigned long delay,
int ntimes);
94 unsigned long getDelay()
const {
return delay;}
96 void setDelay(
unsigned long time);
104 int getTimerNo()
const {
return timer_no;}
111 bool auto_delete, is_running, is_looping;
112 int timer_no, ntimes;
118 struct timeval& timeout;
129 static unsigned long getTime();
130 static void getTime(timeval& time);
131 static void minTime(
struct timeval& mintime,
struct timeval& time);
132 static void addTime(
struct timeval& time,
unsigned long millisec_delay);
133 static bool lessTime(
struct timeval& time,
struct timeval& t2);
135 bool resetTimers(
struct timeval& delay);
138 typedef std::vector<UTimer*> Timers;
a UTimer object fires callbacks after a given delay.
Definition: utimer.hpp:45
virtual void onTimeout(UCall &callback)
synonym for onAction().
Definition: utimer.hpp:76
virtual void onAction(UCall &callback)
adds a callback that is fired when the time is up.
Definition: utimer.cpp:203
Definition: uappliImpl.hpp:40
Base class of objects that can be added to the UBIT scene graph (SEE DETAILS!).
Definition: unode.hpp:38
Definition: utimer.hpp:127
virtual void start()
(re)starts the timer.
Definition: utimer.cpp:114
The Application Context.
Definition: uappli.hpp:79
UTimer(bool auto_delete=true)
creates a new timer.
Definition: utimer.cpp:175
base class of callback objects for firing functions or methods.
Definition: ucall.hpp:144
virtual void stop()
stops the timer.
Definition: utimer.cpp:161
Definition: uhardfont.hpp:31
bool isRunning() const
returns true if the timer is currently running.
Definition: utimer.hpp:98