Merge pull request #380 from Floens/postpone-time-fraction
Support time fractions in lua postpone.
This commit is contained in:
commit
d434580d23
5
lua-tg.c
5
lua-tg.c
@ -1391,7 +1391,10 @@ static int postpone_from_lua (lua_State *L) {
|
|||||||
t[1] = a2;
|
t[1] = a2;
|
||||||
*(void **)(t + 2) = ev;
|
*(void **)(t + 2) = ev;
|
||||||
|
|
||||||
struct timeval ts= { timeout, 0};
|
struct timeval ts= {
|
||||||
|
.tv_sec = (long)timeout,
|
||||||
|
.tv_usec = (timeout - ((long)timeout)) * 1000000
|
||||||
|
};
|
||||||
event_add (ev, &ts);
|
event_add (ev, &ts);
|
||||||
|
|
||||||
lua_pushboolean (L, 1);
|
lua_pushboolean (L, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user