INGOR
|
Structure for Timer functions. More...
#include <ytTimer.h>
Public Member Functions | |
ytTimer * | ytTimer_new () |
Constructs the ytTimer instance. | |
void | ytTimer_delete (ytTimer *this) |
Deletes the ytTimer instance. | |
void | ytTimer_start_type (ytTimer *timer, ytTimer_type type) |
Start to measure the time with a timer type. | |
double | ytTimer_getTime () |
Returns the absolute time (seconds from Jan. 1, 1970). | |
void | ytTimer_printDDHHMMSS (ytTimer *timer, FILE *fp) |
Prints the current timer in day, hour, min, sec format. | |
void | ytTimer_printDDHHMMSSSSS (const ytTimer *timer, FILE *fp) |
Prints the current timer in day, hour, min, sec and milli-sec. | |
Structure for Timer functions.
This module is to provide timer functions for measuring various running times between any points in the program. Users can start and stop the timer any times and can obtain the current elapsed time of the timer in various formats.
This modules uses gettimeofday() function to measure times by default.
See ytTimer for details.
double ytTimer_getTime | ( | ) |
Returns the absolute time (seconds from Jan. 1, 1970).
ytTimer * ytTimer_new | ( | ) |
Constructs the ytTimer instance.
The time is measured by gettimeofday() function by default. To change it, use ytTimer_type().
void ytTimer_start_type | ( | ytTimer * | timer, |
ytTimer_type | type | ||
) |
Start to measure the time with a timer type.
This is simply an alias of calling Time_set_type() and then ytTimer_start().