Skip to content

Commit 9230c86

Browse files
committed
Fix 6.3 build error
1 parent 9714319 commit 9230c86

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/JavaScriptEventLoop/JavaScriptEventLoop+ExecutorFactory.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,19 @@ extension JavaScriptEventLoop: SchedulingExecutor {
4848
} else if let _ = clock as? SuspendingClock {
4949
duration = delay as! SuspendingClock.Duration
5050
} else {
51-
// Hand-off the scheduling work to Clock implementation for unknown clocks
51+
#if compiler(>=6.4)
52+
// Hand-off the scheduling work to Clock implementation for unknown clocks.
53+
// Clock.enqueue is only available in the development branch (6.4+).
5254
clock.enqueue(
5355
job,
5456
on: self,
5557
at: clock.now.advanced(by: delay),
5658
tolerance: tolerance
5759
)
5860
return
61+
#else
62+
fatalError("Unsupported clock type; only ContinuousClock and SuspendingClock are supported")
63+
#endif
5964
}
6065
#else
6166
fatalError("SchedulingExecutor.enqueue is not supported in embedded mode")

0 commit comments

Comments
 (0)