2007-08-04 03:01:46 +00:00
|
|
|
#ifndef _CLOCK_MESSAGE_
|
|
|
|
#define _CLOCK_MESSAGE_
|
|
|
|
#include "clock.h"
|
|
|
|
#include "plugin.h"
|
2008-11-20 11:27:31 +00:00
|
|
|
#include "lib/picture.h"
|
2007-08-04 03:01:46 +00:00
|
|
|
|
|
|
|
struct counter{
|
|
|
|
int ticks_at_last_unpause;/* to count the time from last pause to now */
|
|
|
|
int ticks_since_started;/* accumulated time */
|
|
|
|
bool paused;
|
|
|
|
};
|
|
|
|
|
|
|
|
void counter_init(struct counter* counter);
|
|
|
|
void counter_toggle(struct counter* counter);
|
|
|
|
#define counter_reset(counter) counter_init(counter)
|
|
|
|
void counter_pause(struct counter* counter, bool paused);
|
|
|
|
void counter_get_elapsed_time(struct counter* counter, struct time* elapsed_time);
|
|
|
|
|
|
|
|
#endif /* _CLOCK_MESSAGE_ */
|