Index: src/platform-win32.cc |
diff --git a/src/platform-win32.cc b/src/platform-win32.cc |
index 02c25bc1c2ba37473142fdb2abcea321a393e294..12cd610a3420c834d98efeea59f41ed59ebdbf33 100644 |
--- a/src/platform-win32.cc |
+++ b/src/platform-win32.cc |
@@ -462,6 +462,9 @@ void Time::SetToCurrentTime() { |
// Check if we need to resync due to elapsed time. |
needs_resync |= (time_now.t_ - init_time.t_) > kMaxClockElapsedTime; |
+ // Check if we need to resync due to backwards time change. |
+ needs_resync |= time_now.t_ < init_time.t_; |
+ |
// Resync the clock if necessary. |
if (needs_resync) { |
GetSystemTimeAsFileTime(&init_time.ft_); |