+ if (expire_time > mach_absolute_time()) {
+ uint32_t tcflags = THREAD_CALL_DELAY_USER_NORMAL;
+
+ if (mk_timer_flags & MK_TIMER_CRITICAL) {
+ tcflags = THREAD_CALL_DELAY_USER_CRITICAL;
+ }
+
+ if (mk_leeway != 0) {
+ tcflags |= THREAD_CALL_DELAY_LEEWAY;
+ }
+
+ if (!thread_call_enter_delayed_with_leeway(
+ &timer->call_entry, NULL,
+ expire_time, mk_leeway, tcflags)) {
+
+ timer->active++;
+ }
+ } else {
+ if (!thread_call_enter1(&timer->call_entry, NULL))
+ timer->active++;
+ }