Skip to content

Commit f5d8c14

Browse files
committed
Add explicit cast to non-apple platforms
1 parent 1484f1c commit f5d8c14

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

stdlib/public/Concurrency/DispatchGlobalExecutor.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,6 @@ clock_and_value_to_time(int clock, long long sec, long long nsec) {
314314
case swift_clock_id_continuous:
315315
return value | DISPATCH_UP_OR_MONOTONIC_TIME_MASK;
316316
case swift_clock_id_wall: {
317-
#if defined(_WIN32)
318-
struct timespec ts = {
319-
.tv_sec = sec,
320-
.tv_nsec = static_cast<long>(nsec)
321-
};
322317
#elif defined(__APPLE__)
323318
struct timespec ts = {
324319
.tv_sec = static_cast<__darwin_time_t>(sec),
@@ -327,7 +322,7 @@ clock_and_value_to_time(int clock, long long sec, long long nsec) {
327322
#else
328323
struct timespec ts = {
329324
.tv_sec = static_cast<long>(sec),
330-
.tv_nsec = nsec
325+
.tv_nsec = static_cast<long>(nsec)
331326
};
332327
#endif
333328
return dispatch_walltime(&ts, 0);

0 commit comments

Comments
 (0)