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.
1 parent a23499b commit b367a34Copy full SHA for b367a34
libcxx/src/chrono.cpp
@@ -235,7 +235,7 @@ static steady_clock::time_point __libcpp_steady_clock_now() {
235
struct timespec ts;
236
if (timespec_get(&ts, TIME_MONOTONIC) != TIME_MONOTONIC)
237
__throw_system_error(errno, "timespec_get(TIME_MONOTONIC) failed");
238
- return steady_clock::time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec));
+ return steady_clock::time_point(seconds(ts.tv_sec) + microseconds(ts.tv_nsec / 1000));
239
}
240
241
# elif defined(_LIBCPP_HAS_CLOCK_GETTIME)
0 commit comments