diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-10-07 04:40:59 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-10-07 04:40:59 +0000 |
commit | f4dadea763c1959a27dead24df3ee6c54c209842 (patch) | |
tree | c13b294a8ca5438d59b60e3f5a25a4f7c1fc9a1b /src/timeout.h | |
parent | 562d8cceb704a96a7b2f9acc4bc229ab9f5c6541 (diff) | |
download | luasocket-f4dadea763c1959a27dead24df3ee6c54c209842.tar.gz luasocket-f4dadea763c1959a27dead24df3ee6c54c209842.tar.bz2 luasocket-f4dadea763c1959a27dead24df3ee6c54c209842.zip |
Before compiling on Windows.
Diffstat (limited to 'src/timeout.h')
-rw-r--r-- | src/timeout.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/timeout.h b/src/timeout.h index 27e0a8a..a328bcc 100644 --- a/src/timeout.h +++ b/src/timeout.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef TM_H | 1 | #ifndef TIMEOUT_H |
2 | #define TM_H | 2 | #define TIMEOUT_H |
3 | /*=========================================================================*\ | 3 | /*=========================================================================*\ |
4 | * Timeout management functions | 4 | * Timeout management functions |
5 | * LuaSocket toolkit | 5 | * LuaSocket toolkit |
@@ -9,22 +9,22 @@ | |||
9 | #include "lua.h" | 9 | #include "lua.h" |
10 | 10 | ||
11 | /* timeout control structure */ | 11 | /* timeout control structure */ |
12 | typedef struct t_tm_ { | 12 | typedef struct t_timeout_ { |
13 | double block; /* maximum time for blocking calls */ | 13 | double block; /* maximum time for blocking calls */ |
14 | double total; /* total number of miliseconds for operation */ | 14 | double total; /* total number of miliseconds for operation */ |
15 | double start; /* time of start of operation */ | 15 | double start; /* time of start of operation */ |
16 | } t_tm; | 16 | } t_timeout; |
17 | typedef t_tm *p_tm; | 17 | typedef t_timeout *p_timeout; |
18 | 18 | ||
19 | int tm_open(lua_State *L); | 19 | int timeout_open(lua_State *L); |
20 | void tm_init(p_tm tm, double block, double total); | 20 | void timeout_init(p_timeout tm, double block, double total); |
21 | double tm_get(p_tm tm); | 21 | double timeout_get(p_timeout tm); |
22 | double tm_getretry(p_tm tm); | 22 | double timeout_getretry(p_timeout tm); |
23 | p_tm tm_markstart(p_tm tm); | 23 | p_timeout timeout_markstart(p_timeout tm); |
24 | double tm_getstart(p_tm tm); | 24 | double timeout_getstart(p_timeout tm); |
25 | double tm_gettime(void); | 25 | double timeout_gettime(void); |
26 | int tm_meth_settimeout(lua_State *L, p_tm tm); | 26 | int timeout_meth_settimeout(lua_State *L, p_timeout tm); |
27 | 27 | ||
28 | #define tm_iszero(tm) ((tm)->block == 0.0) | 28 | #define timeout_iszero(tm) ((tm)->block == 0.0) |
29 | 29 | ||
30 | #endif /* TM_H */ | 30 | #endif /* TIMEOUT_H */ |