#include <timer.h>
Definition at line 103 of file timer.h.
◆ Timer() [1/2]
dart::Timer::Timer |
( |
int64_t |
elapsed, |
|
|
int64_t |
elapsed_cpu |
|
) |
| |
|
inline |
Definition at line 105 of file timer.h.
106 : monotonic_(elapsed), cpu_(elapsed) {}
◆ Timer() [2/2]
◆ ~Timer()
◆ AddTotal()
void dart::Timer::AddTotal |
( |
const Timer & |
other | ) |
|
|
inline |
Definition at line 135 of file timer.h.
135 {
136 monotonic_.AddTotal(other.monotonic_);
137 cpu_.AddTotal(other.cpu_);
138 }
◆ FormatElapsedHumanReadable() [1/2]
const char * dart::Timer::FormatElapsedHumanReadable |
( |
Zone * |
zone | ) |
const |
|
inline |
Definition at line 140 of file timer.h.
140 {
143 }
const char * FormatElapsedHumanReadable(Zone *zone) const
int64_t TotalElapsedTimeCpu() const
int64_t TotalElapsedTime() const
◆ FormatElapsedHumanReadable() [2/2]
static const char * dart::Timer::FormatElapsedHumanReadable |
( |
Zone * |
zone, |
|
|
int64_t |
total_elapsed, |
|
|
int64_t |
total_elapsed_cpu |
|
) |
| |
|
inlinestatic |
Definition at line 162 of file timer.h.
164 {
165 if ((total_elapsed == 0) ||
166 static_cast<double>(
Utils::Abs(total_elapsed - total_elapsed_cpu) /
169 } else {
172 }
173 }
static char * SCreate(Zone *zone, const char *format,...) PRINTF_ATTRIBUTE(2
static const char * FormatTime(Zone *zone, int64_t total)
static constexpr double kCpuTimeReportingThreshold
◆ FormatTime()
static const char * dart::Timer::FormatTime |
( |
Zone * |
zone, |
|
|
int64_t |
total |
|
) |
| |
|
inlinestatic |
Definition at line 145 of file timer.h.
145 {
150 } else {
152 }
153 }
constexpr intptr_t kMicrosecondsPerMillisecond
constexpr double MicrosecondsToSeconds(int64_t micros)
constexpr intptr_t kMicrosecondsPerSecond
constexpr double MicrosecondsToMilliseconds(int64_t micros)
◆ IsReset()
bool dart::Timer::IsReset |
( |
| ) |
const |
|
inline |
Definition at line 133 of file timer.h.
133{ return monotonic_.IsReset(); }
◆ MaxContiguous()
int64_t dart::Timer::MaxContiguous |
( |
| ) |
const |
|
inline |
Definition at line 126 of file timer.h.
126{ return monotonic_.MaxContiguous(); }
◆ Reset()
void dart::Timer::Reset |
( |
| ) |
|
|
inline |
Definition at line 128 of file timer.h.
128 {
129 monotonic_.Reset();
130 cpu_.Reset();
131 }
◆ Start()
void dart::Timer::Start |
( |
| ) |
|
|
inline |
Definition at line 111 of file timer.h.
111 {
112 cpu_.Start();
113 monotonic_.Start();
114 }
◆ Stop()
void dart::Timer::Stop |
( |
| ) |
|
|
inline |
Definition at line 117 of file timer.h.
117 {
118 cpu_.Stop();
119 monotonic_.Stop();
120 }
◆ TotalElapsedTime()
int64_t dart::Timer::TotalElapsedTime |
( |
| ) |
const |
|
inline |
Definition at line 123 of file timer.h.
123{ return monotonic_.TotalElapsedTime(); }
◆ TotalElapsedTimeCpu()
int64_t dart::Timer::TotalElapsedTimeCpu |
( |
| ) |
const |
|
inline |
Definition at line 124 of file timer.h.
124{ return cpu_.TotalElapsedTime(); }
◆ kCpuTimeReportingThreshold
constexpr double dart::Timer::kCpuTimeReportingThreshold = 0.05 |
|
staticconstexpr |
The documentation for this class was generated from the following file:
- third_party/dart-lang/sdk/runtime/vm/timer.h