diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-15 20:10:51 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-15 20:10:51 +0000 |
commit | cd8fb1ae6e12527b723596ec27d51e3774151eb5 (patch) | |
tree | 48c5894389b2b3566f67b2305b0dc4cea32bc1ff /base/time_posix.cc | |
parent | 9c8d0add41c7d0868f2f396940f6b595d3a432b0 (diff) | |
download | chromium_src-cd8fb1ae6e12527b723596ec27d51e3774151eb5.zip chromium_src-cd8fb1ae6e12527b723596ec27d51e3774151eb5.tar.gz chromium_src-cd8fb1ae6e12527b723596ec27d51e3774151eb5.tar.bz2 |
[Mac] Enable message loop start UMA measurement on Mac
Turned out we were only recording this information on Windows.
Bug=None
TEST=All unit tests should pass
BUG=
Review URL: https://chromiumcodereview.appspot.com/10557007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/time_posix.cc')
-rw-r--r-- | base/time_posix.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/base/time_posix.cc b/base/time_posix.cc index 6f4423f..5fc2c5d 100644 --- a/base/time_posix.cc +++ b/base/time_posix.cc @@ -262,6 +262,16 @@ TimeTicks TimeTicks::NowFromSystemTraceTime() { #endif // !OS_MACOSX +// static +Time Time::FromTimeVal(struct timeval t) { + DCHECK_LT(t.tv_usec, static_cast<int>(Time::kMicrosecondsPerSecond)); + DCHECK_GE(t.tv_usec, 0); + return Time( + (static_cast<int64>(t.tv_sec) * Time::kMicrosecondsPerSecond) + + t.tv_usec + + kTimeTToMicrosecondsOffset); +} + struct timeval Time::ToTimeVal() const { struct timeval result; int64 us = us_ - kTimeTToMicrosecondsOffset; |