summaryrefslogtreecommitdiff
path: root/hrtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'hrtime.h')
-rw-r--r--hrtime.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hrtime.h b/hrtime.h
index 80aff5deb3..7ed4e6b04c 100644
--- a/hrtime.h
+++ b/hrtime.h
@@ -206,6 +206,7 @@ double2hrtime(rb_hrtime_t *hrt, double d)
const double TIMESPEC_SEC_MAX_PLUS_ONE = 2.0 * (TIMESPEC_SEC_MAX_as_double / 2.0 + 1.0);
if (TIMESPEC_SEC_MAX_PLUS_ONE <= d) {
+ *hrt = RB_HRTIME_MAX;
return NULL;
}
else if (d <= 0) {