summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/metrics.cc2
-rw-r--r--src/metrics.h2
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<double>(Now() - started_); }
void Restart() { started_ = Now(); }