summaryrefslogtreecommitdiff
path: root/lib/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/timer.h')
-rw-r--r--lib/timer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/timer.h b/lib/timer.h
index 161e39d3..4a3a2108 100644
--- a/lib/timer.h
+++ b/lib/timer.h
@@ -41,7 +41,6 @@ struct timeloop
BUFFER_(timer *) timers;
struct domain_generic *domain;
struct birdloop *loop;
- struct coroutine *coro;
};
#define TLOCK_TIMER_ASSERT(loop) ASSERT_DIE((loop)->domain && DG_IS_LOCKED((loop)->domain))
@@ -55,7 +54,6 @@ static inline timer *timers_first(struct timeloop *loop)
#define current_time() atomic_load_explicit(&last_time, memory_order_acquire)
#define current_real_time() atomic_load_explicit(&real_time, memory_order_acquire)
-#define current_time_update() ({ times_update(); current_time(); })
//#define now (current_time() TO_S)
//#define now_real (current_real_time() TO_S)
@@ -101,12 +99,14 @@ tm_set_max(timer *t, btime when)
}
static inline void
-tm_start_max(timer *t, btime after)
+tm_start_max_in(timer *t, btime after, struct birdloop *loop)
{
btime rem = tm_remains(t);
- tm_start(t, MAX_(rem, after));
+ tm_start_in(t, MAX_(rem, after), loop);
}
+#define tm_start_max(t, after) tm_start_max_in(t, after, &main_birdloop)
+
/* In sysdep code */
void times_update(void);