OpenImageIO
|
Simple timer class. More...
#include "version.h"
#include <sys/time.h>
#include <cstdlib>
Go to the source code of this file.
Classes | |
class | ScopedTimer< TIMER > |
Functions | |
template<class FUNC > | |
double | time_trial (FUNC func, int n=1, double *range=NULL) |
Variables | |
OIIO_NAMESPACE_ENTER | |
Simple timer class.
double time_trial | ( | FUNC | func, |
int | n = 1 , |
||
double * | range = NULL |
||
) |
Helper template that runs a function (or functor) n times, using a Timer to benchmark the results, and returning the fastest trial. If 'range' is non-NULL, the range (max-min) of the various time trials will be stored there.