We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6524e61 + 4f7ee11 commit 06cc09bCopy full SHA for 06cc09b
ext/stackprof/stackprof.c
@@ -49,9 +49,9 @@ static const char *fake_frame_cstrs[] = {
49
}
50
51
static int64_t delta_usec(timestamp_t *start, timestamp_t *end) {
52
- int64_t result = 1000 * (end->tv_sec - start->tv_sec);
+ int64_t result = MICROSECONDS_IN_SECOND * (end->tv_sec - start->tv_sec);
53
if (end->tv_nsec < start->tv_nsec) {
54
- result -= 1000;
+ result -= MICROSECONDS_IN_SECOND;
55
result += (NANOSECONDS_IN_SECOND + end->tv_nsec - start->tv_nsec) / 1000;
56
} else {
57
result += (end->tv_nsec - start->tv_nsec) / 1000;
0 commit comments