aboutsummaryrefslogtreecommitdiff
path: root/src/timeout.h
diff options
context:
space:
mode:
authorCaleb Maclennan <caleb@alerque.com>2023-11-10 09:12:04 +0300
committerCaleb Maclennan <caleb@alerque.com>2023-11-10 09:12:04 +0300
commit5c4fc93d5f4137bf4c22ddf1a048c907a4a26727 (patch)
treea9a68e1f6a9c3bfe2b64fa1c3a4098865b7d3b5d /src/timeout.h
parentccef3bc4e2aa6ee5b997a80aabb58f4ff0b0e98f (diff)
parent43a97b7f0053313b43906371dbdc226271e6c8ab (diff)
downloadluasocket-hjelmeland-patch-1.tar.gz
luasocket-hjelmeland-patch-1.tar.bz2
luasocket-hjelmeland-patch-1.zip
Merge branch 'master' into hjelmeland-patch-1hjelmeland-patch-1
Diffstat (limited to '')
-rw-r--r--src/timeout.h18
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 */
10typedef struct t_timeout_ { 10typedef struct t_timeout_ {
@@ -14,14 +14,26 @@ 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#ifndef _WIN32
18#pragma GCC visibility push(hidden)
19#endif
20
18void timeout_init(p_timeout tm, double block, double total); 21void timeout_init(p_timeout tm, double block, double total);
19double timeout_get(p_timeout tm); 22double timeout_get(p_timeout tm);
23double timeout_getstart(p_timeout tm);
20double timeout_getretry(p_timeout tm); 24double timeout_getretry(p_timeout tm);
21p_timeout timeout_markstart(p_timeout tm); 25p_timeout timeout_markstart(p_timeout tm);
22double timeout_getstart(p_timeout tm); 26
23double timeout_gettime(void); 27double timeout_gettime(void);
28
29int timeout_open(lua_State *L);
30
24int timeout_meth_settimeout(lua_State *L, p_timeout tm); 31int timeout_meth_settimeout(lua_State *L, p_timeout tm);
32int 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