Files Classes Functions Hierarchy
#include <aclock.h>
Public Member Functions | |
| void | measure () |
| Call measure() before and after the event. | |
| void | measure2 () |
| long int const | diff () const |
| Difference in clock cycles. | |
| long int const | diff2 () const |
| double const | diff_ms () const |
| Difference in milliseconds. | |
| double const | diff_s () const |
| Difference in seconds. | |
Usage: Call measure() before and after the event being timed. Call difference functions diff_s() or diff().
aclock ac; ac.measure(); event(); ac.measure(); cout << "The event took " << ac.diff_ms() << "ms" << endl;
Definition at line 24 of file aclock.h.
| long int const aclock::diff | ( | ) | const [inline] |
| long int const aclock::diff2 | ( | ) | const [inline] |
| double const aclock::diff_ms | ( | ) | const [inline] |
Difference in milliseconds.
Definition at line 49 of file aclock.h.
References diff().
Referenced by dumbarraytest03(), generateRandomSeed(), test017(), test018(), and halfspaceD3test::test03().
00050 { return (double const) diff()*( (double const)1000. / (double const) CLOCKS_PER_SEC ); }
| double const aclock::diff_s | ( | ) | const [inline] |
Difference in seconds.
Definition at line 53 of file aclock.h.
References diff().
Referenced by d4meshpointreader::eval(), d3meshpointreader::eval(), filereadingmesh(), rsatest::test02(), timmingexperiment00(), timmingexperiment01(), and timmingexperiment02().
00054 { return (double const) diff()/ (double const) CLOCKS_PER_SEC; }
| void aclock::measure | ( | ) | [inline] |
Call measure() before and after the event.
Definition at line 35 of file aclock.h.
Referenced by dumbarraytest03(), d4meshpointreader::eval(), d3meshpointreader::eval(), filereadingmesh(), generateRandomSeed(), test017(), test018(), rsatest::test02(), halfspaceD3test::test03(), timmingexperiment00(), timmingexperiment01(), and timmingexperiment02().
| void aclock::measure2 | ( | ) | [inline] |
1.5.8