stop

Return elapsed seconds since last start() More...

static double stop ()
 
static double stop (timer start)
 

Detailed Description

Return elapsed seconds since last start()

Return elapsed seconds since start

timer start = start();
while(working) {
start();
//Do work
cout << stop() << endl; //Time for this increment of work
}
//INCORRECT: Returns time since last start() (the one in loop)
cout << stop() << endl;
//CORRECT: Returns time since \c start
cout << stop(start) << endl;

Function Documentation

static double stop ( timer  start)
static