Skip to content

Commit b1c87eb

Browse files
authored
Merge pull request #336 from lf-lang/pretty-print-time
Fix silly error in pretty printing time
2 parents ccc45bf + 5ea2976 commit b1c87eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/tag.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ size_t lf_readable_time(char* buffer, instant_t time) {
260260
const char* units = "nanoseconds";
261261
if (time % MSEC(1) == (instant_t) 0) {
262262
units = "milliseconds";
263-
time = time % MSEC(1);
263+
time = time / MSEC(1);
264264
} else if (time % USEC(1) == (instant_t) 0) {
265265
units = "microseconds";
266-
time = time % USEC(1);
266+
time = time / USEC(1);
267267
}
268268
size_t printed = lf_comma_separated_time(buffer, time);
269269
buffer += printed;

0 commit comments

Comments
 (0)