Crossfire Server, Trunk
timers.h File Reference
#include <global.h>
#include <object.h>
#include <time.h>
+ Include dependency graph for timers.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cftimer


#define MAX_TIMERS   1000
#define TIMER_ERR_ID   -1
#define TIMER_ERR_MODE   -3
#define TIMER_ERR_NONE   0
#define TIMER_ERR_OBJ   -2
#define TIMER_MODE_DEAD   0


cftimer timers_table [MAX_TIMERS]

Detailed Description

Variables for the custom timers. See Custom timers.

Definition in file timers.h.

Macro Definition Documentation


#define MAX_TIMERS   1000

Maximum number of timers.

Definition at line 61 of file timers.h.


#define TIMER_ERR_ID   -1

Invalid timer id.

Definition at line 67 of file timers.h.


#define TIMER_ERR_MODE   -3

Invalid timer mode.

Definition at line 69 of file timers.h.


#define TIMER_ERR_NONE   0

No error.

Definition at line 66 of file timers.h.


#define TIMER_ERR_OBJ   -2

NULL object, or no EVENT_TIMER handler.

Definition at line 68 of file timers.h.



Timer is in server cycles.

Definition at line 49 of file timers.h.


#define TIMER_MODE_DEAD   0

Used to mark a timer as unused in the list.

Definition at line 47 of file timers.h.



Timer is in seconds.

Definition at line 48 of file timers.h.

Variable Documentation

◆ timers_table

cftimer timers_table[MAX_TIMERS]

The actual timers.

Definition at line 37 of file timers.cpp.

Referenced by cftimer_create(), cftimer_destroy(), cftimer_find_free_id(), cftimer_init(), and cftimer_process_timers().