Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3229)

Unified Diff: base/time_win.cc

Issue 7910002: Switch on use of precompiled headers for VS 2008. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up comments++ Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | build/win_precompile.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « DEPS ('k') | build/win_precompile.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698