#include <event.h>Data Structures | |
| struct | timeval |
| struct | itimerval |
Defines | |
| #define | _TIME_H 1 |
Typedefs | |
| typedef struct timeval | timeval_t |
| typedef struct itimerval | itimerval_t |
Functions | |
| int16_t | gettimeofday (struct timeval *tv) |
| int16_t | settimeofday (const struct timeval *tv) |
| int16_t | timer () |
| int16_t | gettitimer (int16_t timerid, itimerval_t *value) |
| int16_t | setitimer (int16_t timerid, const itimerval_t *value, itimerval_t *old_value, void(*timer_handler)(event_t event, void *cbargs, void *context), void *resource, void *context) |
| #define _TIME_H 1 |
| typedef struct itimerval itimerval_t |
| int16_t gettimeofday | ( | struct timeval * | tv | ) |
A system call to access time of day.
| [out] | tv | system fills the time value structure with system's time of the day. |
| int16_t gettitimer | ( | int16_t | timerid, | |
| itimerval_t * | value | |||
| ) |
Get value of an interval timer.
| [in] | timerid | a valid timer id return by timer() |
| [out] | value | to get the value of the timer |
| int16_t setitimer | ( | int16_t | timerid, | |
| const itimerval_t * | value, | |||
| itimerval_t * | old_value, | |||
| void(*)(event_t event, void *cbargs, void *context) | timer_handler, | |||
| void * | resource, | |||
| void * | context | |||
| ) |
Set the value of an interval timer. Setting the value to zero means stopping the current timer.
| [in] | timerid | a valid timer id return by timer(). |
| [in] | value | new interval timer value |
| [out] | old_value | if old timer interval is not zero, it will copied into old_value. Pass NULL if don't care. |
| [in] | timer_handler | the continuation callback handler that will be fired when value becomes zero. If NULL is passed here, the call will fail. |
| [in] | resource | no requirement here. |
| [in] | context | user context |
| [in] | event | Type is SETITIMER in EventsEnum. |
| [in] | cbargs | return resource in setitimer(). |
| [in] | context | return context in setitimer(). |
| int16_t settimeofday | ( | const struct timeval * | tv | ) |
A system call to set system's time of day.
| [in] | tv | the time value structure that the system will take as time of day. |
| int16_t timer | ( | ) |
Request a unique resource identifier that enables scheduling timers.
1.5.5