Linux implementation of the timer interface.
More...
#include <stddef.h>
#include <sys/types.h>
#include "timer_linux.h"
| void countdown |
( |
Timer * |
, |
|
|
unsigned |
int |
|
) |
| |
Sets the timer to expire in a specified number of seconds.
- Parameters
-
| Timer | - pointer to the timer to be set to expire in seconds |
| unsigned | int - set the timer to expire in this number of seconds |
| void countdown_ms |
( |
Timer * |
, |
|
|
unsigned |
int |
|
) |
| |
Sets the timer to expire in a specified number of milliseconds.
- Parameters
-
| Timer | - pointer to the timer to be set to expire in milliseconds |
| unsigned | int - set the timer to expire in this number of milliseconds |
Call this function passing in a timer to check if that timer has expired.
- Parameters
-
| Timer | - pointer to the timer to be checked for expiration |
- Returns
- character - 1 = timer expired, 0 = timer not expired
| void InitTimer |
( |
Timer * |
| ) |
|
Performs any initialization required to the timer passed in.
- Parameters
-
| Timer | - pointer to the timer to be initialized |
Checks the input timer and returns the number of milliseconds remaining on the timer.
- Parameters
-
| Timer | - pointer to the timer to be set to checked |
- Returns
- int - milliseconds left on the countdown timer