JeVois  1.21
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
Loading...
Searching...
No Matches
jevois::TimerOne Class Reference

#include <jevois/Debug/Timer.H>

Simple one-shot timer class.

This class reports the time spent between start() and stop(). Typically, this may be useful to report processing time of a neural network, by rendering the string returned by stop() into the video output.

Definition at line 69 of file Timer.H.

Public Member Functions

 TimerOne (char const *prefix)
 Constructor.
 
void start ()
 Start a time measurement period.
 
std::string stop (double *seconds)
 End a time measurement period, report time spent as: 'prefix: ms (fps)' where % is replaced by values.
 
std::string stop ()
 Same as the other signature of stop() except does not provide seconds, for python bindings.
 

Constructor & Destructor Documentation

◆ TimerOne()

jevois::TimerOne::TimerOne ( char const *  prefix)

Constructor.

Definition at line 145 of file Timer.C.

Member Function Documentation

◆ start()

void jevois::TimerOne::start ( )

Start a time measurement period.

Definition at line 150 of file Timer.C.

◆ stop() [1/2]

std::string jevois::TimerOne::stop ( )

Same as the other signature of stop() except does not provide seconds, for python bindings.

Definition at line 170 of file Timer.C.

◆ stop() [2/2]

std::string jevois::TimerOne::stop ( double *  seconds)

End a time measurement period, report time spent as: 'prefix: ms (fps)' where % is replaced by values.

If seconds is not null, it will be set to the instantaneous number of seconds between start() and stop().

Definition at line 156 of file Timer.C.

References jevois::secs2str().


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