mlpack provides a simple timer interface for the timing of machine learning methods. The results of any timers used during the program are displayed at output by the mlpack::CLI object, when –verbose is given:
The mlpack::Timer class provides three simple methods:
Each timer is given a name, and is referenced by that name.
A "total_time" timer is run by default for each mlpack program.
Below is a very simple example of timer usage in code.
If the –verbose flag was given to this executable, the resultant time that "some_timer" ran for would be shown.
Generated by 1.8.13