diff options
author | Chris Wilson <chris+github@qwirx.com> | 2012-11-17 00:54:04 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2012-11-17 00:54:04 +0000 |
commit | ea2f013734a6ff260c935181e4d194ee6bba8e9a (patch) | |
tree | aa892b15ec844c69f7964a88fae65a91d116eb25 /lib/common/Timer.cpp | |
parent | 2c094f82ae5964b8b448634045576f145c370ca2 (diff) |
Fix timer miscalculation on Windows.
Diffstat (limited to 'lib/common/Timer.cpp')
-rw-r--r-- | lib/common/Timer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/common/Timer.cpp b/lib/common/Timer.cpp index 238860d6..cc82e4ab 100644 --- a/lib/common/Timer.cpp +++ b/lib/common/Timer.cpp @@ -364,7 +364,7 @@ Timer::Timer(size_t timeoutMillis, const std::string& rName) else { Timers::Add(*this); - Start(timeoutMillis * 1000); + Start(timeoutMillis); } } @@ -393,7 +393,7 @@ void Timer::Start() timeToExpiry = 1; } - Start(timeToExpiry); + Start(timeToExpiry / MICRO_SEC_IN_MILLI_SEC); #endif } @@ -430,6 +430,10 @@ void Timer::Start(int64_t timeoutMillis) GetErrorMessage(GetLastError())); mTimerHandle = INVALID_HANDLE_VALUE; } + else + { + BOX_INFO(TIMER_ID << "set for " << timeoutMillis << " ms"); + } #endif } |