aboutsummaryrefslogtreecommitdiff
path: root/src/timeout.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/timeout.h')
-rw-r--r--src/timeout.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/timeout.h b/src/timeout.h
index 1dc0a5a..43476cb 100644
--- a/src/timeout.h
+++ b/src/timeout.h
@@ -3,23 +3,29 @@
3* 3*
4* RCS ID: $Id$ 4* RCS ID: $Id$
5\*=========================================================================*/ 5\*=========================================================================*/
6#ifndef _TM_H 6#ifndef TM_H
7#define _TM_H 7#define TM_H
8 8
9typedef struct t_tm_tag { 9#include <lua.h>
10 int tm_return; 10
11 int tm_block; 11/* timeout control structure */
12 int tm_start; 12typedef struct t_tm_ {
13 int tm_end; 13 int total; /* total number of miliseconds for operation */
14 int block; /* maximum time for blocking calls */
15 int start; /* time of start of operation */
14} t_tm; 16} t_tm;
15typedef t_tm *p_tm; 17typedef t_tm *p_tm;
16 18
17void tm_set(p_tm tm, int tm_block, int tm_return);
18int tm_getremaining(p_tm tm);
19int tm_getelapsed(p_tm tm);
20int tm_gettime(void);
21void tm_get(p_tm tm, int *tm_block, int *tm_return);
22void tm_markstart(p_tm tm);
23void tm_open(lua_State *L); 19void tm_open(lua_State *L);
20void tm_init(p_tm tm, int block, int total);
21void tm_setblock(p_tm tm, int block);
22void tm_settotal(p_tm tm, int total);
23int tm_getblock(p_tm tm);
24int tm_gettotal(p_tm tm);
25void tm_markstart(p_tm tm);
26int tm_getstart(p_tm tm);
27int tm_get(p_tm tm);
28int tm_gettime(void);
29int tm_meth_timeout(lua_State *L, p_tm tm);
24 30
25#endif 31#endif