diff options
Diffstat (limited to 'lib/timer.c')
-rw-r--r-- | lib/timer.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/timer.c b/lib/timer.c index 7ca0bdaa..2c08b353 100644 --- a/lib/timer.c +++ b/lib/timer.c @@ -56,6 +56,17 @@ current_time(void) return timeloop_current()->last_time; } +btime +current_real_time(void) +{ + struct timeloop *loop = timeloop_current(); + + if (!loop->real_time) + times_update_real_time(loop); + + return loop->real_time; +} + #define TIMER_LESS(a,b) ((a)->expires < (b)->expires) #define TIMER_SWAP(heap,a,b,t) (t = heap[a], heap[a] = heap[b], heap[b] = t, \ |