From 6a410a3d5b652f12e6f755c3bc1d0fc52b54d207 Mon Sep 17 00:00:00 2001 From: Claus Klein Date: Fri, 27 Jul 2012 13:06:03 -0700 Subject: fix error and prevent warning in GetTimeMillis() --- src/metrics.cc | 2 +- src/metrics.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/metrics.cc b/src/metrics.cc index 8407717..ca4f97a 100644 --- a/src/metrics.cc +++ b/src/metrics.cc @@ -120,6 +120,6 @@ uint64_t Stopwatch::Now() const { } int64_t GetTimeMillis() { - return 1000 * TimerToMicros(HighResTimer()); + return TimerToMicros(HighResTimer()) / 1000; } diff --git a/src/metrics.h b/src/metrics.h index dae6b9f..f5ac0de 100644 --- a/src/metrics.h +++ b/src/metrics.h @@ -72,7 +72,7 @@ public: Stopwatch() : started_(0) {} /// Seconds since Restart() call - double Elapsed() const { return 1e-6 * (Now() - started_); } + double Elapsed() const { return 1e-6 * static_cast(Now() - started_); } void Restart() { started_ = Now(); } -- cgit v0.12