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