Fixed a spurious "timer was never started" warning.
This commit is contained in:
@ -992,7 +992,7 @@ static void db_reset_stats(void)
|
||||
So that intermediate stats are calculated from the current moment
|
||||
rather than from the previous intermediate report
|
||||
*/
|
||||
if (sb_timer_initialized(&sb_globals.exec_timer))
|
||||
if (sb_timer_running(&sb_globals.exec_timer))
|
||||
sb_timer_split(&sb_globals.exec_timer);
|
||||
|
||||
if (sb_globals.debug)
|
||||
|
||||
@ -69,6 +69,12 @@ int sb_timer_initialized(sb_timer_t *t)
|
||||
return t->state != TIMER_UNINITIALIZED;
|
||||
}
|
||||
|
||||
/* check whether the timer is running */
|
||||
int sb_timer_running(sb_timer_t *t)
|
||||
{
|
||||
return t->state != TIMER_RUNNING;
|
||||
}
|
||||
|
||||
/* start timer */
|
||||
|
||||
|
||||
|
||||
@ -93,6 +93,9 @@ void sb_timer_reset(sb_timer_t *t);
|
||||
/* check whether the timer is initialized */
|
||||
int sb_timer_initialized(sb_timer_t *t);
|
||||
|
||||
/* check whether the timer is running */
|
||||
int sb_timer_running(sb_timer_t *t);
|
||||
|
||||
/* start timer */
|
||||
void sb_timer_start(sb_timer_t *);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user