Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Ase::Stopwatch Class Reference

Public Member Functions

 Stopwatch (const String &msg="")
 Automatically start stop watch.
 
void start (const String &msg="")
 Start or restart stop watch, printing msg later on.
 
void stop (const String &msg="")
 Stop stop watch, print msg.
 
double seconds () const
 Provide seconds elapsed between start() and stop().
 
double milliseconds () const
 Provide milliseconds elapsed between start() and stop().
 
 ~Stopwatch ()
 Stop and print a previous msg if still running.
 

Detailed Description

Definition at line 74 of file platform.hh.

Constructor & Destructor Documentation

◆ Stopwatch()

Ase::Stopwatch::Stopwatch ( const String msg = "")
explicit

Automatically start stop watch.

Definition at line 643 of file platform.cc.

References start().

◆ ~Stopwatch()

Ase::Stopwatch::~Stopwatch ( )

Stop and print a previous msg if still running.

Definition at line 682 of file platform.cc.

References stop().

Member Function Documentation

◆ milliseconds()

double Ase::Stopwatch::milliseconds ( ) const

Provide milliseconds elapsed between start() and stop().

Definition at line 676 of file platform.cc.

Referenced by stop().

◆ seconds()

double Ase::Stopwatch::seconds ( ) const

Provide seconds elapsed between start() and stop().

Definition at line 669 of file platform.cc.

◆ start()

void Ase::Stopwatch::start ( const String msg = "")

Start or restart stop watch, printing msg later on.

Definition at line 650 of file platform.cc.

References std::string::empty(), and Ase::timestamp_realtime().

Referenced by Stopwatch().

◆ stop()

void Ase::Stopwatch::stop ( const String msg = "")

Stop stop watch, print msg.

Definition at line 659 of file platform.cc.

References std::string::empty(), milliseconds(), and Ase::timestamp_realtime().

Referenced by ~Stopwatch().


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