summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-20 21:46:48 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-20 21:46:48 +0000
commitce9ca28e14bc8e02678c02df977bae0a85fba040 (patch)
tree3a380c056f0a5a0cf52d45dd6772cfcce95b3be3 /base
parent385347182b57be9e0d013179b45ff91c139cc177 (diff)
downloadchromium_src-ce9ca28e14bc8e02678c02df977bae0a85fba040.zip
chromium_src-ce9ca28e14bc8e02678c02df977bae0a85fba040.tar.gz
chromium_src-ce9ca28e14bc8e02678c02df977bae0a85fba040.tar.bz2
Relanding precompiled header support for VS 2008, now enabled for
Debug builds only as official builds were failing with out of memory errors. This is mostly a revert of http://crrev.com/101836 which was a revert of the original change, http://crrev.com/101474, except for a modification to build/win_precompile.gypi to only enable use of precompiled headers in the Debug configuration. BUG=none TEST=it builds Review URL: http://codereview.chromium.org/7977003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102029 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/time_win.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/base/time_win.cc b/base/time_win.cc
index 9bb04de..9e6fe53 100644
--- a/base/time_win.cc
+++ b/base/time_win.cc
@@ -363,7 +363,12 @@ class HighResNowSingleton {
if (!IsUsingHighResClock())
return 0;
- return abs((UnreliableNow() - ReliableNow()) - skew_);
+ // 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 we use it
+ // everywhere.
+ // TODO(joi): Remove the hint if/when we no longer support VS 2008.
+ return abs(static_cast<long>((UnreliableNow() - ReliableNow()) - skew_));
}
private: