Chromium Code Reviews| Index: base/time_win.cc |
| diff --git a/base/time_win.cc b/base/time_win.cc |
| index 9bb04de7a47d19e1eabffd7343d2e90b6cba5405..f0799e559d06a12c5b8883851d56910f5ed3fd42 100644 |
| --- a/base/time_win.cc |
| +++ b/base/time_win.cc |
| @@ -363,7 +363,15 @@ class HighResNowSingleton { |
| if (!IsUsingHighResClock()) |
| return 0; |
| +#if defined(OS_WIN) |
| + // The static_cast<long> is needed as a hint to VS 2008 to tell it |
| + // which version of abs() to use. Other compilers don't seem to |
| + // need it, including VS 2010, but to keep code identical between |
| + // VS 2008 and 2010 we use the hint for all Windows builds. |
| + return abs(static_cast<long>((UnreliableNow() - ReliableNow()) - skew_)); |
|
brettw
2011/09/15 18:03:15
Is it possible to use this on all platforms and sk
|
| +#else |
| return abs((UnreliableNow() - ReliableNow()) - skew_); |
| +#endif |
| } |
| private: |