For internal use only.
This test program is used to test the operation of the timer manipulation functions.
Definition in file t_timer_fcns.c.
#include "event-test.h"
#include <sys/time.h>
Include dependency graph for t_timer_fcns.c:
Go to the source code of this file.
Data Structures | |
struct | test_timer |
Structure for defining a timer to create. More... | |
struct | test_resched |
Structure for defining a timer rescheduling to perform. More... | |
Defines | |
#define | TTF_SEC |
Number of seconds for current time. | |
#define | TTF_USEC |
Number of microseconds for current time. | |
#define | TT_FLAG_DESTROY |
Timer destruction flag. | |
#define | timer_init(type, sec, usec, flags) |
Initializer for test timers. | |
#define | resched_init(timer, type, sec, usec) |
Initializer for test rescheduling. | |
Functions | |
int | gettimeofday (struct timeval *tv, struct timezone *tz) |
Overridden gettimeofday() function. | |
int | main (int argc, char **argv) |
Timer manipulation functions test program. | |
Variables | |
static struct test_timer | timers [] |
Array of test timers. | |
static struct test_resched | resched [] |
Array of test reschedules. |
|
For internal use only. This macro initializes an element of the test timer reschedule array.
Definition at line 207 of file t_timer_fcns.c. |
|
For internal use only. This macro initializes an element of the test timer array.
Definition at line 122 of file t_timer_fcns.c. |
|
For internal use only. This flag indicates that the timer will be passed to timer_destroy() in order to test that function. Definition at line 103 of file t_timer_fcns.c. Referenced by main(). |
|
For internal use only. This macro simply contains the number of seconds for the "current" time for testing purposes. (There's nothing special about this number; it's just the value for Monday, September 12, 21:03:15 EDT 2005, which just happens to be when this test program was written.) Definition at line 47 of file t_timer_fcns.c. Referenced by gettimeofday(). |
|
For internal use only. This macro simply contains the number of microseconds for the "current" time for testing purposes. (There's nothing special about this number; see TTF_SEC.) Definition at line 56 of file t_timer_fcns.c. Referenced by gettimeofday(). |
|
For internal use only. This is an override of the C library's gettimeofday() function. Since it's not ANSI, we're supposed to be able to do so. We're doing this to be able to control what periodic and relative timers have their expire time set to, for testing purposes.
Definition at line 73 of file t_timer_fcns.c. |
|
For internal use only. This program is used for testing the timer manipulation functions timer_create(), timer_destroy(), and timer_resched(). Definition at line 357 of file t_timer_fcns.c. References ev_lib_init, ev_prog_name, ev_test_init, prog, ti_expire, ti_type, ti_value, timer_create(), timer_destroy(), timer_resched(), and TT_FLAG_DESTROY. Here is the call graph for this function: ![]() |
|
For internal use only. This array contains all the information for the test timer reschedules to be performed. Definition at line 218 of file t_timer_fcns.c. |
|
For internal use only. This array contains all the information for the timers which will be created in the process of testing timer_create() and friends. Definition at line 132 of file t_timer_fcns.c. |