We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
UTIME_OMIT
UTIME_NOW
1 parent 72eade3 commit d9b4c5dCopy full SHA for d9b4c5d
Sources/SystemExtras/Clock.swift
@@ -111,12 +111,20 @@ extension Clock {
111
112
@_alwaysEmitIntoClient
113
public static var now: TimeSpec {
114
+#if os(WASI)
115
return TimeSpec(rawValue: CInterop.TimeSpec(tv_sec: 0, tv_nsec: Int(UTIME_NOW)))
116
+#else
117
+ return TimeSpec(rawValue: CInterop.TimeSpec(tv_sec: 0, tv_nsec: Int(_UTIME_NOW)))
118
+#endif
119
}
120
121
122
public static var omit: TimeSpec {
123
124
return TimeSpec(rawValue: CInterop.TimeSpec(tv_sec: 0, tv_nsec: Int(UTIME_OMIT)))
125
126
+ return TimeSpec(rawValue: CInterop.TimeSpec(tv_sec: 0, tv_nsec: Int(_UTIME_OMIT)))
127
128
129
130
0 commit comments