HILA
Loading...
Searching...
No Matches
hila::timer Class Reference

#include <timing.h>

Detailed Description

Timers are used to time recurring events. Usage:

    static timer loop_timer("Loop");

    loop_timer.start();
       < timed section >
    loop_timer.stop();

All timer values are automatically reported on program exit (hila::finishrun calls report_timers())

Timer can be reset with loop_timer.reset();

Timer value can be inquired with timer_value tval = loop_timer.value(); where timer_value is a struct defined below.

Other time related functions: double hila::gettime(); - returns the time in seconds from program start void hila::timestamp("message"); - prints msg + current date+time + time from start

void hila::setup_timelimit(long seconds); - sets the cpu time limit (see time_to_finish()) bool hila::time_to_finish(); - to be called periodically at a suitable spot in the program; returns true if the program should exit now.

Signal handling functions (for SIGUSR1): int hila::signal_status(); - returns the signal SIGUSR1 if set

Definition at line 57 of file timing.h.


The documentation for this class was generated from the following files: