mirror of
https://github.com/google/benchmark.git
synced 2025-04-13 13:01:54 +08:00
clang-format
This commit is contained in:
parent
e5be00e4a5
commit
d4904fc6e8
21
src/timers.h
21
src/timers.h
@ -23,17 +23,17 @@ double ThreadCPUUsage();
|
||||
// return an absolute time, but since ChronoClockNow() is only used
|
||||
// to compute elapsed time, this shouldn't matter.
|
||||
struct QuRTClock {
|
||||
typedef uint64_t rep;
|
||||
typedef std::ratio<1,19200000> period;
|
||||
typedef std::chrono::duration<rep, period> duration;
|
||||
typedef std::chrono::time_point<QuRTClock> time_point;
|
||||
static const bool is_steady = false;
|
||||
typedef uint64_t rep;
|
||||
typedef std::ratio<1,19200000> period;
|
||||
typedef std::chrono::duration<rep, period> duration;
|
||||
typedef std::chrono::time_point<QuRTClock> time_point;
|
||||
static const bool is_steady = false;
|
||||
|
||||
static time_point now() {
|
||||
unsigned long long count;
|
||||
asm volatile(" %0 = c31:30 " : "=r"(count));
|
||||
return time_point(static_cast<duration>(count));
|
||||
}
|
||||
static time_point now() {
|
||||
unsigned long long count;
|
||||
asm volatile(" %0 = c31:30 " : "=r"(count));
|
||||
return time_point(static_cast<duration>(count));
|
||||
}
|
||||
};
|
||||
|
||||
#else
|
||||
@ -68,7 +68,6 @@ inline double ChronoClockNow() {
|
||||
return FpSeconds(ClockType::now().time_since_epoch()).count();
|
||||
}
|
||||
|
||||
|
||||
std::string LocalDateTimeString();
|
||||
|
||||
} // end namespace benchmark
|
||||
|
Loading…
Reference in New Issue
Block a user