Ion
|
#include "timer.h"
Public Types | |
typedef std::conditional < std::chrono::high_resolution_clock::is_steady, std::chrono::high_resolution_clock, std::chrono::steady_clock > ::type | steady_clock |
Use the high_resolution_clock if it is steady, otherwise use the steady_clock. More... | |
typedef steady_clock | Clock |
Public Member Functions | |
Timer () | |
void | Reset () |
Resets the timer. More... | |
Clock::duration | Get () const |
Returns the elapsed time since construction or the last Reset(). More... | |
double | GetInS () const |
Returns the elapsed time since construction or the last Reset() in seconds. More... | |
double | GetInMs () const |
Returns the elapsed time since construction or the last Reset() in milliseconds. More... | |
Static Public Member Functions | |
static void | SleepNSeconds (unsigned int seconds) |
Sleeps for the passed number of seconds. More... | |
static void | SleepNMilliseconds (unsigned int milliseconds) |
Sleeps for n milliseconds. More... | |
typedef steady_clock ion::port::Timer::Clock |
typedef std::conditional<std::chrono::high_resolution_clock::is_steady, std::chrono::high_resolution_clock, std::chrono::steady_clock>::type ion::port::Timer::steady_clock |
Timer::Clock::duration ion::port::Timer::Get | ( | ) | const |
Returns the elapsed time since construction or the last Reset().
Definition at line 85 of file timer.cc.
Referenced by ion::analytics::Benchmark::VariableSampler::AddSample(), GetInMs(), GetInS(), ion::profile::CallTraceManager::GetTimeInNs(), and ion::profile::CallTraceManager::GetTimeInUs().
double ion::port::Timer::GetInMs | ( | ) | const |
double ion::port::Timer::GetInS | ( | ) | const |
Returns the elapsed time since construction or the last Reset() in seconds.
Convenience wrapper for Get().
Definition at line 87 of file timer.cc.
References Get().
Referenced by ion::analytics::GpuPerformanceTester::MeasurePerformance(), and ion::analytics::GpuPerformanceTester::MeasureResourceCreation().
void ion::port::Timer::Reset | ( | ) |
Resets the timer.
Definition at line 83 of file timer.cc.
Referenced by ion::analytics::Benchmark::VariableSampler::AddSample(), ion::analytics::GpuPerformanceTester::MeasureResourceCreation(), and Timer().
|
static |
|
static |