Porting to LUA 5.0 final
This commit is contained in:
parent
c1ef3e7103
commit
0f6c8d50a9
32 changed files with 1539 additions and 1128 deletions
|
@ -3,23 +3,29 @@
|
|||
*
|
||||
* RCS ID: $Id$
|
||||
\*=========================================================================*/
|
||||
#ifndef _TM_H
|
||||
#define _TM_H
|
||||
#ifndef TM_H
|
||||
#define TM_H
|
||||
|
||||
typedef struct t_tm_tag {
|
||||
int tm_return;
|
||||
int tm_block;
|
||||
int tm_start;
|
||||
int tm_end;
|
||||
#include <lua.h>
|
||||
|
||||
/* timeout control structure */
|
||||
typedef struct t_tm_ {
|
||||
int total; /* total number of miliseconds for operation */
|
||||
int block; /* maximum time for blocking calls */
|
||||
int start; /* time of start of operation */
|
||||
} t_tm;
|
||||
typedef t_tm *p_tm;
|
||||
|
||||
void tm_set(p_tm tm, int tm_block, int tm_return);
|
||||
int tm_getremaining(p_tm tm);
|
||||
int tm_getelapsed(p_tm tm);
|
||||
int tm_gettime(void);
|
||||
void tm_get(p_tm tm, int *tm_block, int *tm_return);
|
||||
void tm_markstart(p_tm tm);
|
||||
void tm_open(lua_State *L);
|
||||
void tm_init(p_tm tm, int block, int total);
|
||||
void tm_setblock(p_tm tm, int block);
|
||||
void tm_settotal(p_tm tm, int total);
|
||||
int tm_getblock(p_tm tm);
|
||||
int tm_gettotal(p_tm tm);
|
||||
void tm_markstart(p_tm tm);
|
||||
int tm_getstart(p_tm tm);
|
||||
int tm_get(p_tm tm);
|
||||
int tm_gettime(void);
|
||||
int tm_meth_timeout(lua_State *L, p_tm tm);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue