summaryrefslogtreecommitdiff
path: root/utils/google-benchmark/src/sleep.cc
diff options
context:
space:
mode:
Diffstat (limited to 'utils/google-benchmark/src/sleep.cc')
-rw-r--r--utils/google-benchmark/src/sleep.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/google-benchmark/src/sleep.cc b/utils/google-benchmark/src/sleep.cc
index 918abc485dc3..54aa04a42247 100644
--- a/utils/google-benchmark/src/sleep.cc
+++ b/utils/google-benchmark/src/sleep.cc
@@ -15,6 +15,7 @@
#include "sleep.h"
#include <cerrno>
+#include <cstdlib>
#include <ctime>
#include "internal_macros.h"
@@ -40,7 +41,7 @@ void SleepForMicroseconds(int microseconds) {
}
void SleepForMilliseconds(int milliseconds) {
- SleepForMicroseconds(static_cast<int>(milliseconds) * kNumMicrosPerMilli);
+ SleepForMicroseconds(milliseconds * kNumMicrosPerMilli);
}
void SleepForSeconds(double seconds) {