Skip to content

Commit d730dd1

Browse files
committed
Fix timestamp math for platforms without _POSIX_MONOTONIC_CLOCK
Pretty much a rebase tmm1#122
1 parent 4031222 commit d730dd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/stackprof/stackprof.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static const char *fake_frame_cstrs[] = {
6969
static int64_t delta_usec(timestamp_t *start, timestamp_t *end) {
7070
struct timeval diff;
7171
timersub(end, start, &diff);
72-
return (1000 * diff.tv_sec) + diff.tv_usec;
72+
return (MICROSECONDS_IN_SECOND * diff.tv_sec) + diff.tv_usec;
7373
}
7474
#endif
7575

0 commit comments

Comments
 (0)