diff options
Diffstat (limited to '')
-rw-r--r-- | src/timeout.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/timeout.h b/src/timeout.h index 6715ca7..9e5250d 100644 --- a/src/timeout.h +++ b/src/timeout.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * Timeout management functions | 4 | * Timeout management functions |
5 | * LuaSocket toolkit | 5 | * LuaSocket toolkit |
6 | \*=========================================================================*/ | 6 | \*=========================================================================*/ |
7 | #include "lua.h" | 7 | #include "luasocket.h" |
8 | 8 | ||
9 | /* timeout control structure */ | 9 | /* timeout control structure */ |
10 | typedef struct t_timeout_ { | 10 | typedef struct t_timeout_ { |
@@ -14,14 +14,26 @@ typedef struct t_timeout_ { | |||
14 | } t_timeout; | 14 | } t_timeout; |
15 | typedef t_timeout *p_timeout; | 15 | typedef t_timeout *p_timeout; |
16 | 16 | ||
17 | int timeout_open(lua_State *L); | 17 | #ifndef _WIN32 |
18 | #pragma GCC visibility push(hidden) | ||
19 | #endif | ||
20 | |||
18 | void timeout_init(p_timeout tm, double block, double total); | 21 | void timeout_init(p_timeout tm, double block, double total); |
19 | double timeout_get(p_timeout tm); | 22 | double timeout_get(p_timeout tm); |
23 | double timeout_getstart(p_timeout tm); | ||
20 | double timeout_getretry(p_timeout tm); | 24 | double timeout_getretry(p_timeout tm); |
21 | p_timeout timeout_markstart(p_timeout tm); | 25 | p_timeout timeout_markstart(p_timeout tm); |
22 | double timeout_getstart(p_timeout tm); | 26 | |
23 | double timeout_gettime(void); | 27 | double timeout_gettime(void); |
28 | |||
29 | int timeout_open(lua_State *L); | ||
30 | |||
24 | int timeout_meth_settimeout(lua_State *L, p_timeout tm); | 31 | int timeout_meth_settimeout(lua_State *L, p_timeout tm); |
32 | int timeout_meth_gettimeout(lua_State *L, p_timeout tm); | ||
33 | |||
34 | #ifndef _WIN32 | ||
35 | #pragma GCC visibility pop | ||
36 | #endif | ||
25 | 37 | ||
26 | #define timeout_iszero(tm) ((tm)->block == 0.0) | 38 | #define timeout_iszero(tm) ((tm)->block == 0.0) |
27 | 39 | ||