Chi-Tech
chi::Timer Class Reference

#include <chi_timer.h>

Public Member Functions

 Timer () noexcept
 
void Reset ()
 
double GetTime () const
 
std::string GetTimeString () const
 

Static Public Member Functions

static std::string GetLocalDateTimeString ()
 

Private Attributes

std::chrono::steady_clock::time_point start_time_
 

Detailed Description

Timer object.

Definition at line 12 of file chi_timer.h.

Constructor & Destructor Documentation

◆ Timer()

chi::Timer::Timer ( )
noexcept

Default constructor.

Definition at line 9 of file chi_timer.cc.

Member Function Documentation

◆ GetLocalDateTimeString()

std::string chi::Timer::GetLocalDateTimeString ( )
static

Obtains a string in the format YYYY-MM-DD hh:mm:ss

Definition at line 55 of file chi_timer.cc.

◆ GetTime()

double chi::Timer::GetTime ( ) const

Gets the current timer value in milliseconds.

Definition at line 23 of file chi_timer.cc.

◆ GetTimeString()

std::string chi::Timer::GetTimeString ( ) const

Obtains a string in the format of hh:mm::ss.

Definition at line 38 of file chi_timer.cc.

◆ Reset()

void chi::Timer::Reset ( )

Resets the timer to zero.

Definition at line 16 of file chi_timer.cc.

Field Documentation

◆ start_time_

std::chrono::steady_clock::time_point chi::Timer::start_time_
private

Definition at line 15 of file chi_timer.h.


The documentation for this class was generated from the following files: