INGOR
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ytTimer Class Reference

Structure for Timer functions. More...

#include <ytTimer.h>

Public Member Functions

ytTimerytTimer_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.
 

Detailed Description

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.

Member Function Documentation

◆ ytTimer_getTime()

double ytTimer_getTime ( )

Returns the absolute time (seconds from Jan. 1, 1970).


◆ ytTimer_new()

ytTimer * ytTimer_new ( )

Constructs the ytTimer instance.

The time is measured by gettimeofday() function by default. To change it, use ytTimer_type().

◆ ytTimer_start_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().

Go to Top

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