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 261897d commit 60f063aCopy full SHA for 60f063a
libc-bottom-half/cloudlibc/src/common/time.h
@@ -99,7 +99,7 @@ static inline struct timespec instant_to_timespec(
99
static inline struct timeval instant_to_timeval(
100
monotonic_clock_instant_t ns) {
101
// Decompose instant into seconds and microoseconds
102
- return (struct timeval){.tv_sec = ns / 1000,
+ return (struct timeval){.tv_sec = ns / NSEC_PER_SEC,
103
.tv_usec = ns % 1000};
104
}
105
0 commit comments