Blue Brain BioExplorer
core::Timer Class Reference

#include <Timer.h>

Public Member Functions

 Timer ()
 
void start ()
 
void stop ()
 
double elapsed () const
 
int64_t microseconds () const
 
int64_t milliseconds () const
 
double seconds () const
 
double perSecond () const
 
double fps () const
 
double perSecondSmoothed () const
 

Detailed Description

Simple timer class to measure time spent in a portion of the code

Definition at line 29 of file Timer.h.

Constructor & Destructor Documentation

◆ Timer()

core::Timer::Timer ( )

Definition at line 28 of file Timer.cpp.

Member Function Documentation

◆ elapsed()

double core::Timer::elapsed ( ) const
Returns
the elapsed time in seconds since the last start().

Definition at line 39 of file Timer.cpp.

◆ fps()

double core::Timer::fps ( ) const
Returns
the current FPS, updated every 150 ms

Definition at line 85 of file Timer.cpp.

◆ microseconds()

int64_t core::Timer::microseconds ( ) const
Returns
last interval from start() to stop() in microseconds.

Definition at line 60 of file Timer.cpp.

◆ milliseconds()

int64_t core::Timer::milliseconds ( ) const
Returns
last interval from start() to stop() in milliseconds.

Definition at line 65 of file Timer.cpp.

◆ perSecond()

double core::Timer::perSecond ( ) const
Returns
last interval from start() to stop() in per seconds, e.g. for frame per seconds

Definition at line 75 of file Timer.cpp.

◆ perSecondSmoothed()

double core::Timer::perSecondSmoothed ( ) const
Returns
last smoothed interval from start() to stop() in per seconds, e.g. for frame per seconds

Definition at line 80 of file Timer.cpp.

◆ seconds()

double core::Timer::seconds ( ) const
Returns
last interval from start() to stop() in seconds.

Definition at line 70 of file Timer.cpp.

◆ start()

void core::Timer::start ( )

(Re)Start the timer at 'now'

Definition at line 34 of file Timer.cpp.

◆ stop()

void core::Timer::stop ( )

Stops the timer and records the interval + a smoothed value over time

Definition at line 44 of file Timer.cpp.


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