File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -117,11 +117,10 @@ public:
117
117
118
118
this .subCount();
119
119
} else static if (IsAppleOS) {
120
- mach_timespec_t timeout = mach_timespec_t(
121
- tv_sec: cast (uint )convert! (" msecs" , " seconds" )(timeoutMs),
122
- tv_nsec: cast (clock_res_t)convert! (" msecs" , " nsecs" )(timeoutMs)
123
- );
124
-
120
+ mach_timespec_t timeout;
121
+ timeout.tv_sec = cast (uint )convert! (" msecs" , " seconds" )(timeoutMs);
122
+ timeout.tv_nsec = cast (clock_res_t)convert! (" msecs" , " nsecs" )(timeoutMs);
123
+
125
124
while (true ) {
126
125
127
126
auto rc = semaphore_timedwait(handle, timeout);
@@ -136,10 +135,9 @@ public:
136
135
}
137
136
138
137
} else version (Posix ) {
139
- timespec timeout = timespec(
140
- tv_sec: convert! (" msecs" , " seconds" )(timeoutMs),
141
- tv_nsec: convert! (" msecs" , " nsecs" )(timeoutMs)
142
- );
138
+ timespec timeout;
139
+ timeout.tv_sec = convert! (" msecs" , " seconds" )(timeoutMs);
140
+ timeout.tv_nsec = convert! (" msecs" , " nsecs" )(timeoutMs);
143
141
144
142
while (true ) {
145
143
You can’t perform that action at this time.
0 commit comments