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
 

Macros

#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_CYCLES   2
 
#define TIMER_MODE_DEAD   0
 
#define TIMER_MODE_SECONDS   1
 

Variables

cftimer timers_table [MAX_TIMERS]
 

Detailed Description

Variables for the custom timers. See Custom timers.

Definition in file timers.h.

Macro Definition Documentation

◆ MAX_TIMERS

#define MAX_TIMERS   1000

Maximum number of timers.

Definition at line 61 of file timers.h.

◆ TIMER_ERR_ID

#define TIMER_ERR_ID   -1

Invalid timer id.

Definition at line 67 of file timers.h.

◆ TIMER_ERR_MODE

#define TIMER_ERR_MODE   -3

Invalid timer mode.

Definition at line 69 of file timers.h.

◆ TIMER_ERR_NONE

#define TIMER_ERR_NONE   0

No error.

Definition at line 66 of file timers.h.

◆ TIMER_ERR_OBJ

#define TIMER_ERR_OBJ   -2

NULL object, or no EVENT_TIMER handler.

Definition at line 68 of file timers.h.

◆ TIMER_MODE_CYCLES

#define TIMER_MODE_CYCLES   2

Timer is in server cycles.

Definition at line 49 of file timers.h.

◆ TIMER_MODE_DEAD

#define TIMER_MODE_DEAD   0

Used to mark a timer as unused in the list.

Definition at line 47 of file timers.h.

◆ TIMER_MODE_SECONDS

#define TIMER_MODE_SECONDS   1

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().