Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index a824d6a7977c34fbd0f6508c3dd4779193a56fa5..8d80f9fd15a91b3ab78d8f33fc770b9c9d47b83b 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -9640,7 +9640,13 @@ RUNTIME_FUNCTION(Runtime_DateCurrentTime) { |
// the number in a Date object representing a particular instant in |
// time is milliseconds. Therefore, we floor the result of getting |
// the OS time. |
- double millis = std::floor(OS::TimeCurrentMillis()); |
+ double millis; |
+ if (FLAG_verify_predictable) { |
+ millis = 1388534400000.0; // Jan 1 2014 00:00:00 GMT+0000 |
+ millis += std::floor(isolate->heap()->synthetic_time()); |
+ } else { |
+ millis = std::floor(OS::TimeCurrentMillis()); |
+ } |
return *isolate->factory()->NewNumber(millis); |
} |