| 25 | static void (*timer_free)(struct timers *, void *) = timer_default_free; |
| 26 | |
| 27 | void timers_set_allocator(void *(*alloc)(struct timers *, size_t len), |
| 28 | void (*free)(struct timers *, void *p)) |
| 29 | { |
| 30 | if (!alloc) |
| 31 | alloc = timer_default_alloc; |
| 32 | if (!free) |
| 33 | free = timer_default_free; |
| 34 | timer_alloc = alloc; |
| 35 | timer_free = free; |
| 36 | } |
| 37 | |
| 38 | static uint64_t time_to_grains(struct timemono t) |
| 39 | { |