Loading...
Searching...
No Matches
ArchIntervalTimer Struct Reference

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

#include <timing.h>

Public Member Functions

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

Detailed Description

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

Definition at line 149 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 152 of file timing.h.

Member Function Documentation

◆ GetCurrentTicks()

uint64_t GetCurrentTicks ( )
inline

Read and return the current time.

Definition at line 181 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 187 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 176 of file timing.h.

◆ IsStarted()

bool IsStarted ( ) const
inline

Return true if this timer is started.

Definition at line 171 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 160 of file timing.h.


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