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

Modules

 stop
 Return elapsed seconds since last 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;