ArchIntervalTimer Struct Reference

A simple timer class for measuring an interval of time using the ArchTickTimer facilities. More...

Public Member Functions

 ArchIntervalTimer (bool start=true)
 Construct a timer and start timing if start is true. More...
 
void Start ()
 Start the timer, or reset the start time if it has already been started. More...
 
bool IsStarted () const
 Return true if this timer is started. More...
 
uint64_t GetStartTicks () const
 Return this timer's start time, or 0 if it hasn't been started. More...
 
uint64_t GetCurrentTicks ()
 Read and return the current time. More...
 
uint64_t GetElapsedTicks ()
 Read the current time and return the difference between it and the start time. More...
 

Detailed Description

A simple timer class for measuring an interval of time using the ArchTickTimer facilities.

Definition at line 166 of file timing.h.

Constructor & Destructor Documentation

◆ ArchIntervalTimer()

ArchIntervalTimer ( bool  start = true)
inlineexplicit

Construct a timer and start timing if start is true.

Definition at line 169 of file timing.h.

Member Function Documentation

◆ GetCurrentTicks()

uint64_t GetCurrentTicks ( )
inline

Read and return the current time.

Definition at line 198 of file timing.h.

◆ GetElapsedTicks()

uint64_t GetElapsedTicks ( )
inline

Read the current time and return the difference between it and the start time.

If the timer was not started, return 0.

Definition at line 204 of file timing.h.

◆ GetStartTicks()

uint64_t GetStartTicks ( ) const
inline

Return this timer's start time, or 0 if it hasn't been started.

Definition at line 193 of file timing.h.

◆ IsStarted()

bool IsStarted ( ) const
inline

Return true if this timer is started.

Definition at line 188 of file timing.h.

◆ Start()

void Start ( )
inline

Start the timer, or reset the start time if it has already been started.

Definition at line 177 of file timing.h.


The documentation for this struct was generated from the following file: