#include "TestUtils/StopWatch.h"
#include <chrono>
#include <ratio>
#include <thread>
#include <iostream>
Go to the source code of this file.
|
void | waitgst (std::chrono::milliseconds dur) |
|
int | main () |
|
Definition at line 32 of file StopWatch_test.cc.
36 std::cout <<
"Creating stop watch..." <<
std::endl;
39 <<
" - elapsed time so far: " 41 <<
" s; partial time: " 48 <<
" - elapsed time so far: " 52 <<
" us); partial time: " 63 <<
" - elapsed time so far: " 67 <<
" us); partial time: " 78 <<
" - elapsed time so far: " 82 <<
" s); partial time: " 93 <<
" - elapsed time so far: " 97 <<
" ms); partial time: " void stop()
Pauses the watch.
ElapsedTime_t elapsed() const
Returns the total time spent running since the last restart.
microsecond microseconds
Alias for common language habits.
ElapsedTime_t partial() const
Returns the time spent running since the last resume.
void restart()
Restarts the watch; previous time is forgotten.
Provides time interval measurements.
second seconds
Alias for common language habits.
millisecond milliseconds
Alias for common language habits.
void resume()
Resumes the run of the watch; previous time is preserved.
void waitgst(std::chrono::milliseconds dur)
QTextStream & endl(QTextStream &s)
void waitgst |
( |
std::chrono::milliseconds |
dur | ) |
|
Definition at line 26 of file StopWatch_test.cc.
27 std::cout <<
" <waiting for " << dur.count() <<
" ms>" <<
std::endl;
28 std::this_thread::sleep_for(dur);
QTextStream & endl(QTextStream &s)