24 #include <utils/time/watch.h> 25 #include <utils/time/clock.h> 26 #include <utils/time/time.h> 67 if (is_running && is_paused)
72 pause_time += pause_stop - pause_start;
107 pause_time += pause_stop - pause_start;
160 if (is_running && !is_paused)
162 ret -= watch_start + pause_time;
164 else if (is_running && is_paused)
167 cur_pause = ret - pause_start;
168 ret -= watch_start + pause_time + cur_pause;
172 ret = watch_stop - watch_start - pause_time;
Time clock_time()
Returns the current clock time.
void get_time(struct timeval *tv) const
Returns the time of the selected time source.
Fawkes library namespace.
This is supposed to be the central clock in Fawkes.
A class for handling time.
void stop(Time *t=0)
Stops the watch.
virtual ~Watch()
Destructor.
void start(Time *t=0)
Starts the watch.
Watch(Clock *clock)
Constructor.
void pause(Time *t=0)
Pauses the watch.
Time watch_time()
Returns the current watch time.
void set_time(const timeval *tv)
Sets the time.