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 60f063a commit 2051b38Copy full SHA for 2051b38
libc-bottom-half/cloudlibc/src/common/time.h
@@ -100,7 +100,7 @@ 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 / NSEC_PER_SEC,
103
- .tv_usec = ns % 1000};
+ .tv_usec = (ns % NSEC_PER_SEC) / 1000};
104
}
105
106
static inline struct timeval timestamp_to_timeval(
0 commit comments