mirror of
https://github.com/google/benchmark.git
synced 2025-01-14 05:40:14 +08:00
94c512c043
Previously the constants used for converting between different units of time were declared using int64_t. However we should only use explicitly sized integer types when they are required, and should use 'int' everwhere else, and there is no good reason to use int64_t here. For that reason this patch changes the type of the constants. This should help address issue #354 as well.
16 lines
465 B
C++
16 lines
465 B
C++
#ifndef BENCHMARK_SLEEP_H_
|
|
#define BENCHMARK_SLEEP_H_
|
|
|
|
namespace benchmark {
|
|
const int kNumMillisPerSecond = 1000;
|
|
const int kNumMicrosPerMilli = 1000;
|
|
const int kNumMicrosPerSecond = kNumMillisPerSecond * 1000;
|
|
const int kNumNanosPerMicro = 1000;
|
|
const int kNumNanosPerSecond = kNumNanosPerMicro * kNumMicrosPerSecond;
|
|
|
|
void SleepForMilliseconds(int milliseconds);
|
|
void SleepForSeconds(double seconds);
|
|
} // end namespace benchmark
|
|
|
|
#endif // BENCHMARK_SLEEP_H_
|