2013-12-19 08:55:45 +08:00
|
|
|
#ifndef BENCHMARK_SLEEP_H_
|
|
|
|
#define BENCHMARK_SLEEP_H_
|
|
|
|
|
2015-03-07 06:01:05 +08:00
|
|
|
#include <cstdint>
|
2013-12-19 08:55:45 +08:00
|
|
|
|
2013-12-20 08:18:09 +08:00
|
|
|
namespace benchmark {
|
2013-12-20 09:16:40 +08:00
|
|
|
const int64_t kNumMillisPerSecond = 1000LL;
|
|
|
|
const int64_t kNumMicrosPerMilli = 1000LL;
|
|
|
|
const int64_t kNumMicrosPerSecond = kNumMillisPerSecond * 1000LL;
|
|
|
|
const int64_t kNumNanosPerMicro = 1000LL;
|
2014-01-21 14:32:16 +08:00
|
|
|
const int64_t kNumNanosPerSecond = kNumNanosPerMicro * kNumMicrosPerSecond;
|
2013-12-20 09:16:40 +08:00
|
|
|
|
2013-12-19 08:55:45 +08:00
|
|
|
void SleepForMilliseconds(int milliseconds);
|
|
|
|
void SleepForSeconds(double seconds);
|
2013-12-20 08:18:09 +08:00
|
|
|
} // end namespace benchmark
|
2013-12-19 08:55:45 +08:00
|
|
|
|
|
|
|
#endif // BENCHMARK_SLEEP_H_
|