aboutsummaryrefslogtreecommitdiff
path: root/src/timeout.h
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2005-10-07 04:40:59 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2005-10-07 04:40:59 +0000
commitf4dadea763c1959a27dead24df3ee6c54c209842 (patch)
treec13b294a8ca5438d59b60e3f5a25a4f7c1fc9a1b /src/timeout.h
parent562d8cceb704a96a7b2f9acc4bc229ab9f5c6541 (diff)
downloadluasocket-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.h30
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 */
12typedef struct t_tm_ { 12typedef 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;
17typedef t_tm *p_tm; 17typedef t_timeout *p_timeout;
18 18
19int tm_open(lua_State *L); 19int timeout_open(lua_State *L);
20void tm_init(p_tm tm, double block, double total); 20void timeout_init(p_timeout tm, double block, double total);
21double tm_get(p_tm tm); 21double timeout_get(p_timeout tm);
22double tm_getretry(p_tm tm); 22double timeout_getretry(p_timeout tm);
23p_tm tm_markstart(p_tm tm); 23p_timeout timeout_markstart(p_timeout tm);
24double tm_getstart(p_tm tm); 24double timeout_getstart(p_timeout tm);
25double tm_gettime(void); 25double timeout_gettime(void);
26int tm_meth_settimeout(lua_State *L, p_tm tm); 26int 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 */