JeVois Smart Embedded Machine Vision Toolkit
Simple timer class.
This class reports the time spent between start() and stop(), at specified intervals. Because JeVois modules typically work at video rates, this class only reports the average time after some number of iterations through start() and stop(). Thus, even if the time of an operation between start() and stop() is only a few microseconds, by reporting it only every 100 frames one will not slow down the overall framerate too much. See Profiler for a class that provides additional checkpoints between start() and stop().
|Timer (char const *prefix, size_t interval=100, int loglevel=LOG_INFO)|
|Start a time measurement period. More...|
|std::string const &||stop ()|
|End a time measurement period, report time spent if reporting interval is reached. More...|
|jevois::Timer::Timer||(||char const *||prefix,|
|std::string const & jevois::Timer::stop||(||)|
End a time measurement period, report time spent if reporting interval is reached.
The fps and cpu load are returned, in case users want to show this info, eg, in an overlay display. Note that the values are only updated when the reporting interval is reached, and remain the same in between.