lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

the function "select" source code in luasocket:

typedef struct t_timeout_ {
    double block;          /* maximum time for blocking calls */
    double total;          /* total number of miliseconds for operation */
    double start;          /* time of start of operation */
} t_timeout;

void timeout_init(p_timeout tm, double block, double total) {
    tm->block = block;
    tm->total = total;

static int global_select(lua_State *L) {
    timeout_init(&tm, t, -1);  //oh,,-1!!!

it's not support.