Go to the source code of this file.
Defines | |
| #define | SET_ONE_SHOT_TIMER_ERROR -1 |
| Return value for the function set_one_shot_timer(). An error occured while setting the one shot timer. | |
| #define | SET_ONE_SHOT_TIMER_OK -2 |
| Return value for the function set_one_shot_timer(). The one shot timer was successfully created. | |
| #define | CANCEL_ONE_SHOT_TIMER_ERROR -3 |
| Return value for the function cancel_one_shot_timer(). An error occured while canceling the one shot timer. | |
| #define | CANCEL_ONE_SHOT_TIMER_OK -4 |
| Return value for the function cancel_one_shot_timer(). The one shot timer was successfully canceled. | |
| #define | PAUSE_ONE_SHOT_TIMER_ERROR -5 |
| Return value for the function pause_one_shot_timer(). An error occured with the high precision timer. | |
| #define | PAUSE_ONE_SHOT_TIMER_OK -6 |
| Return value for the function pause_one_shot_timer(). The one shot timer was successfully paused. | |
| #define | RESTART_ONE_SHOT_TIMER_ERROR -7 |
| Return value for the function restart_one_shot_timer(). An error occured with the high precision timer. | |
| #define | RESTART_ONE_SHOT_TIMER_OK -8 |
| Return value for the function restart_one_shot_timer(). The one shot timer was successfully restarted. | |
| #define | TIMING_HD |
Functions | |
| int | start_chrono () |
| Start the stopwatch. | |
| int | stop_chrono () |
| Stop the stopwatch. | |
| unsigned long int | get_ms () |
| Get the measured time in ms. | |
| int | set_one_shot_timer (long sec, long micro_second) |
| Create a one shot timer which precision is the micro second. The timer raises the signal SIGALRM when the timout expired. | |
| int | cancel_one_shot_timer () |
| Cancel the previously activated one shot timer. | |
| int | pause_one_shot_timer () |
| Pause the one shot timer. | |
| int | restart_one_shot_timer () |
| Restart the one shot timer. | |
Definition in file timing.h.
|
|
Cancel the previously activated one shot timer.
Definition at line 99 of file timing.c. References CANCEL_ONE_SHOT_TIMER_ERROR, CANCEL_ONE_SHOT_TIMER_OK, old_one_shot_timer, and one_shot_timer. Referenced by pause_one_shot_timer(). |
|
|
Get the measured time in ms.
|
|
|
Pause the one shot timer.
Definition at line 124 of file timing.c. References cancel_one_shot_timer(), CANCEL_ONE_SHOT_TIMER_OK, current_one_shot_timer, PAUSE_ONE_SHOT_TIMER_ERROR, and PAUSE_ONE_SHOT_TIMER_OK. |
|
|
Restart the one shot timer.
Definition at line 148 of file timing.c. References current_one_shot_timer, old_one_shot_timer, RESTART_ONE_SHOT_TIMER_ERROR, and RESTART_ONE_SHOT_TIMER_OK. |
|
||||||||||||
|
Create a one shot timer which precision is the micro second. The timer raises the signal SIGALRM when the timout expired.
Definition at line 75 of file timing.c. References old_one_shot_timer, one_shot_timer, SET_ONE_SHOT_TIMER_ERROR, and SET_ONE_SHOT_TIMER_OK. |
|
|
Start the stopwatch.
Definition at line 18 of file timing.c. References start. |
|
|
Stop the stopwatch.
Definition at line 27 of file timing.c. References stop. |
1.3-rc1