36#ifndef __YTLIB_TIMER_H
37#define __YTLIB_TIMER_H
42#include "win/systime.h"
57typedef struct ytTimer_t
ytTimer;
61void ytTimer_enableSector(
ytTimer *
this);
64 ytTimer_get_type(
const ytTimer * timer);
66void ytTimer_start(
ytTimer * timer);
68void ytTimer_stop(
ytTimer * timer);
69void ytTimer_stopLap(
ytTimer *
this);
70void ytTimer_clear(
ytTimer * timer);
71void ytTimer_clearStart(
ytTimer * timer);
73double ytTimer_get(
const ytTimer * timer);
74double ytTimer_lap(
ytTimer * timer);
75void ytTimer_sector(
ytTimer *
this);
76double ytTimer_get_avg_lap(
const ytTimer * timer);
79void ytTimer_printDDHHMMSSsec(FILE * fp,
double seconds);
80void ytTimer_printDDHHMMSSSSSsec(FILE * fp,
double seconds);
82void ytTimer_print(
const ytTimer *
this, FILE * fp);
Structure for Timer functions.
ytTimer * ytTimer_new()
Constructs the ytTimer instance.
Definition: ytTimer.c:97
void ytTimer_printDDHHMMSS(ytTimer *timer, FILE *fp)
Prints the current timer in day, hour, min, sec format.
Definition: ytTimer.c:449
double ytTimer_getTime()
Returns the absolute time (seconds from Jan. 1, 1970).
Definition: ytTimer.c:422
void ytTimer_start_type(ytTimer *timer, ytTimer_type type)
Start to measure the time with a timer type.
Definition: ytTimer.c:176
void ytTimer_printDDHHMMSSSSS(const ytTimer *timer, FILE *fp)
Prints the current timer in day, hour, min, sec and milli-sec.
Definition: ytTimer.c:475
void ytTimer_delete(ytTimer *this)
Deletes the ytTimer instance.
Definition: ytTimer.c:114
ytTimer_type
Timer types.
Definition: ytTimer.h:50
@ ytTimer_NORMAL
Definition: ytTimer.h:52
@ ytTimer_CLOCK
timer based on CPU clocks
Definition: ytTimer.h:54