Skip to content

Commit a6b98aa

Browse files
committed
event: support CLOCK_WALL on Windows
This is needed for XCTest to run its test suite.
1 parent 4775112 commit a6b98aa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/event/event_windows.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ _dispatch_timer_callback(PTP_CALLBACK_INSTANCE Instance, PVOID Context,
107107

108108
void
109109
_dispatch_event_loop_timer_arm(uint32_t tidx, dispatch_timer_delay_s range,
110-
dispatch_clock_now_cache_t nows DISPATCH_UNUSED)
110+
dispatch_clock_now_cache_t nows)
111111
{
112112
dispatch_windows_timeout_t timer;
113113
FILETIME ftDueTime;
@@ -117,8 +117,9 @@ _dispatch_event_loop_timer_arm(uint32_t tidx, dispatch_timer_delay_s range,
117117
case DISPATCH_CLOCK_WALL:
118118
timer = &_dispatch_windows_timeout[DISPATCH_CLOCK_WALL];
119119

120-
WIN_PORT_ERROR();
121-
__assume(0);
120+
liTime.QuadPart = range.delay +
121+
_dispatch_time_now_cached(DISPATCH_TIMER_CLOCK(tidx), nows);
122+
break;
122123

123124
// case DISPATCH_CLOCK_UPTIME:
124125
// timer = &_dispatch_windows_timeout[DISPATCH_CLOCK_UPTIME];

0 commit comments

Comments
 (0)