Pixar Arch
Loading...
Searching...
No Matches
pxr::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.

Constructor & Destructor Documentation

◆ ArchIntervalTimer()

pxr::ArchIntervalTimer::ArchIntervalTimer ( bool start = true)
inlineexplicit

Construct a timer and start timing if start is true.

Member Function Documentation

◆ Start()

void pxr::ArchIntervalTimer::Start ( )
inline

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

◆ IsStarted()

bool pxr::ArchIntervalTimer::IsStarted ( ) const
inline

Return true if this timer is started.

◆ GetStartTicks()

uint64_t pxr::ArchIntervalTimer::GetStartTicks ( ) const
inline

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

◆ GetCurrentTicks()

uint64_t pxr::ArchIntervalTimer::GetCurrentTicks ( )
inline

Read and return the current time.

◆ GetElapsedTicks()

uint64_t pxr::ArchIntervalTimer::GetElapsedTicks ( )
inline

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

If the timer was not started, return 0.


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