Sierra Toolkit Version of the Day
|TimeBlock (Timer &timer, bool start_timer=true)|
Class TimeBlock is a time sentry for timing a statement block. The timer is generally started upon construction. But, the start is delayed if the second argument is false. In this case, manually start the timer by calling the start() function. This gives the safety of using a sentry, but does not force to awkwardness associated with local variables crossing the timed block.
Creates a new TimeBlock instance. The newly created instance will start the timer if the start value is true, which is the default case. If the start value is false, the calling function is responsible for starting the timer at the appropriate time.
|timer||a Timer reference to the timer accumulate block run times.|
|start_timer||a bool value to have the timer started on construction.|