aboutsummaryrefslogtreecommitdiff
path: root/src/timeout.h
diff options
context:
space:
mode:
authorE. Westbrook <github@westbrook.io>2019-02-27 21:01:16 -0700
committerE. Westbrook <github@westbrook.io>2019-03-10 00:04:20 -0700
commit42a1a732b79fa6153c61da645b786da883bbd0b5 (patch)
treea5783a545dd47714f4d973798fe9577c41bc829a /src/timeout.h
parent86e1b3f45f57358d6b2a6666043df9a4a2f963c5 (diff)
downloadluasocket-42a1a732b79fa6153c61da645b786da883bbd0b5.tar.gz
luasocket-42a1a732b79fa6153c61da645b786da883bbd0b5.tar.bz2
luasocket-42a1a732b79fa6153c61da645b786da883bbd0b5.zip
timeout: pragma visibility
Diffstat (limited to 'src/timeout.h')
-rw-r--r--src/timeout.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/timeout.h b/src/timeout.h
index af90231..df05eaf 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 */
10typedef struct t_timeout_ { 10typedef struct t_timeout_ {
@@ -14,16 +14,23 @@ typedef struct t_timeout_ {
14} t_timeout; 14} t_timeout;
15typedef t_timeout *p_timeout; 15typedef t_timeout *p_timeout;
16 16
17int timeout_open(lua_State *L); 17#pragma GCC visibility push(hidden)
18
18void timeout_init(p_timeout tm, double block, double total); 19void timeout_init(p_timeout tm, double block, double total);
19double timeout_get(p_timeout tm); 20double timeout_get(p_timeout tm);
21double timeout_getstart(p_timeout tm);
20double timeout_getretry(p_timeout tm); 22double timeout_getretry(p_timeout tm);
21p_timeout timeout_markstart(p_timeout tm); 23p_timeout timeout_markstart(p_timeout tm);
22double timeout_getstart(p_timeout tm); 24
23double timeout_gettime(void); 25double timeout_gettime(void);
26
27int timeout_open(lua_State *L);
28
24int timeout_meth_settimeout(lua_State *L, p_timeout tm); 29int timeout_meth_settimeout(lua_State *L, p_timeout tm);
25int timeout_meth_gettimeout(lua_State *L, p_timeout tm); 30int timeout_meth_gettimeout(lua_State *L, p_timeout tm);
26 31
32#pragma GCC visibility pop
33
27#define timeout_iszero(tm) ((tm)->block == 0.0) 34#define timeout_iszero(tm) ((tm)->block == 0.0)
28 35
29#endif /* TIMEOUT_H */ 36#endif /* TIMEOUT_H */