Celeritas 0.7.0-12+develop.4db216d5c
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::Stopwatch Class Reference

Simple timer. More...

#include <Stopwatch.hh>

Public Member Functions

 Stopwatch ()
 Start the count at construction.
 
double operator() () const &
 Get the current elapsed time in seconds.
 
double operator() () &&
 Get the current elapsed time in seconds, then erase.
 

Detailed Description

Simple timer.

The stopwatch starts counting upward at construction and can be reset by assigning a new stopwatch instance.

Stopwatch get_elapsed_time;
// ...
double time = get_elapsed_time();
// Reset the stopwatch
get_elapsed_time = {};
Simple timer.
Definition Stopwatch.hh:29

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