diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-17 00:18:48 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-17 00:18:48 +0000 |
| commit | 80b7acea2eb19f7facddce17733b88cb50a56cea (patch) | |
| tree | 3b2354627dd2a178e0a66f3c9ab2181405381aec /src/timeout.c | |
| parent | 27c8ae30aaef25d537669062d5f7f929eec18032 (diff) | |
| download | luasocket-80b7acea2eb19f7facddce17733b88cb50a56cea.tar.gz luasocket-80b7acea2eb19f7facddce17733b88cb50a56cea.tar.bz2 luasocket-80b7acea2eb19f7facddce17733b88cb50a56cea.zip | |
Compiled and tested on Windows...
Diffstat (limited to 'src/timeout.c')
| -rw-r--r-- | src/timeout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/timeout.c b/src/timeout.c index 4f9a315..3472ca7 100644 --- a/src/timeout.c +++ b/src/timeout.c | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | #include "auxiliar.h" | 13 | #include "auxiliar.h" |
| 14 | #include "timeout.h" | 14 | #include "timeout.h" |
| 15 | 15 | ||
| 16 | #ifdef WIN32 | 16 | #ifdef _WIN32 |
| 17 | #include <windows.h> | 17 | #include <windows.h> |
| 18 | #else | 18 | #else |
| 19 | #include <time.h> | 19 | #include <time.h> |
| @@ -133,7 +133,7 @@ p_tm tm_markstart(p_tm tm) | |||
| 133 | * Returns | 133 | * Returns |
| 134 | * time in ms. | 134 | * time in ms. |
| 135 | \*-------------------------------------------------------------------------*/ | 135 | \*-------------------------------------------------------------------------*/ |
| 136 | #ifdef WIN32 | 136 | #ifdef _WIN32 |
| 137 | int tm_gettime(void) | 137 | int tm_gettime(void) |
| 138 | { | 138 | { |
| 139 | return GetTickCount(); | 139 | return GetTickCount(); |
| @@ -198,7 +198,7 @@ static int tm_lua_time(lua_State *L) | |||
| 198 | int tm_lua_sleep(lua_State *L) | 198 | int tm_lua_sleep(lua_State *L) |
| 199 | { | 199 | { |
| 200 | double n = luaL_checknumber(L, 1); | 200 | double n = luaL_checknumber(L, 1); |
| 201 | #ifdef WIN32 | 201 | #ifdef _WIN32 |
| 202 | Sleep((int)n*1000); | 202 | Sleep((int)n*1000); |
| 203 | #else | 203 | #else |
| 204 | sleep((int)n); | 204 | sleep((int)n); |
