summaryrefslogtreecommitdiffstats
path: root/src/tsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tsc.c')
-rw-r--r--src/tsc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tsc.c b/src/tsc.c
index 8038c0e..28066a4 100644
--- a/src/tsc.c
+++ b/src/tsc.c
@@ -46,7 +46,7 @@ sandglass_tsc_resolution()
grains2 = grains1;
while (((grains2 >= grains1) ? grains2 - grains1
- : 2000000000L + (grains2 - grains1))
+ : 1000000000L + (grains2 - grains1))
< 10000000L)
{
if (monotonic) {
@@ -56,7 +56,7 @@ sandglass_tsc_resolution()
if (clock_gettime(CLOCK_REALTIME, &ts) != 0)
return 0.0/0.0;
}
- grains2 = sandglass_timespec_grains(&ts);
+ grains2 = ts.tv_nsec;
}
tsc = sandglass_get_tsc() - tsc;