Permalink
Browse files

fix error and prevent warning in GetTimeMillis()

  • Loading branch information...
1 parent 77a869f commit 6a410a3d5b652f12e6f755c3bc1d0fc52b54d207 @ClausKlein ClausKlein committed with evmar Jul 27, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/metrics.cc
  2. +1 −1 src/metrics.h
View
@@ -120,6 +120,6 @@ uint64_t Stopwatch::Now() const {
}
int64_t GetTimeMillis() {
- return 1000 * TimerToMicros(HighResTimer());
+ return TimerToMicros(HighResTimer()) / 1000;
}
View
@@ -72,7 +72,7 @@ class Stopwatch
Stopwatch() : started_(0) {}
/// Seconds since Restart() call
- double Elapsed() const { return 1e-6 * (Now() - started_); }
+ double Elapsed() const { return 1e-6 * static_cast<double>(Now() - started_); }
void Restart() { started_ = Now(); }

0 comments on commit 6a410a3

Please sign in to comment.