File: timeout.h

package info (click to toggle)
fvwm 1:2.6.8-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 15,804 kB
  • sloc: ansic: 145,770; xml: 17,093; perl: 7,302; sh: 4,921; makefile: 1,094; yacc: 688; lex: 187; sed: 11
file content (39 lines) | stat: -rw-r--r-- 1,064 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* -*-c-*- */

#ifndef TIMEOUT_H
#define TIMEOUT_H

/* ---------------------------- included header files ---------------------- */

/* ---------------------------- global definitions ------------------------- */

#define TIMEOUT_MAX_TIMEOUTS 32

/* ---------------------------- global macros ------------------------------ */

/* ---------------------------- type definitions --------------------------- */

typedef int timeout_time_t;
typedef unsigned int timeout_mask_t;
typedef struct
{
	int n_timeouts;
	timeout_time_t *timeouts;
} timeout_t;

/* ---------------------------- forward declarations ----------------------- */

/* ---------------------------- exported variables (globals) --------------- */

/* ---------------------------- interface functions ------------------------ */

timeout_t *timeout_create(
	int n_timeouts);
void timeout_destroy(
	timeout_t *to);
timeout_mask_t timeout_tick(
	timeout_t *to, timeout_time_t n_ticks);
void timeout_rewind(
	timeout_t *to, timeout_mask_t mask, timeout_time_t ticks_before_alarm);

#endif /* TIMEOUT_H */