Timer: new implementation (all tests pass)

This commit is contained in:
o9000
2017-12-29 06:21:53 +01:00
parent f64cf199e4
commit 38bee65b58
3 changed files with 215 additions and 100 deletions

View File

@@ -23,12 +23,14 @@
#include <sys/time.h>
#include "bool.h"
extern bool debug_timers;
typedef void TimerCallback(void *arg);
typedef struct {
char name_[64];
bool enabled_;
double expiration_time_;
long long expiration_time_ms_;
int period_ms_;
TimerCallback *callback_;
void *arg_;