aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/process.c b/process.c
index 1ffb7752ef..6c8e7b235c 100644
--- a/process.c
+++ b/process.c
@@ -6888,7 +6888,6 @@ make_clock_result(struct timetick *ttp, unsigned long numerator, unsigned long d
VALUE
rb_clock_gettime(int argc, VALUE *argv)
{
- struct timespec ts;
VALUE clk_id, unit;
int ret;
@@ -7006,13 +7005,14 @@ rb_clock_gettime(int argc, VALUE *argv)
tt.count = t % 1000000000;
tt.giga_count = t / 1000000000;
numerator = sTimebaseInfo.numer;
- denominator = sTimebaseInfo.denom;
+ denominator = sTimebaseInfo.denom * 1000000000;
goto success;
}
#endif
}
else {
#if defined(HAVE_CLOCK_GETTIME)
+ struct timespec ts;
clockid_t c;
c = NUM2CLOCKID(clk_id);
ret = clock_gettime(c, &ts);