diff options
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_async_events.h | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/src/script/lua_api/l_async_events.h b/src/script/lua_api/l_async_events.h index c33f3a962..9d42b07cf 100644 --- a/src/script/lua_api/l_async_events.h +++ b/src/script/lua_api/l_async_events.h @@ -17,23 +17,12 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef C_ASYNC_EVENTS_H_ -#define C_ASYNC_EVENTS_H_ +#ifndef L_ASYNC_EVENTS_H_ +#define L_ASYNC_EVENTS_H_ #include <vector> #include <map> -#ifndef _WIN32 -#include <unistd.h> -#else -#define _WINSOCKAPI_ -#include <windows.h> -static unsigned sleep(unsigned seconds) { - Sleep(seconds * 1000); - return 0; -} -#endif - /******************************************************************************/ /* Includes */ /******************************************************************************/ @@ -93,15 +82,6 @@ public: return worker_thread_wrapper(this); } - /** - * wait for thread to stop - */ - void Wait() { - while(IsRunning()) { - sleep(1); - } - } - private: /** * helper function to run a lua script @@ -237,4 +217,4 @@ private: JSemaphore m_JobQueueCounter; }; -#endif /* C_ASYNC_EVENTS_H_ */ +#endif /* L_ASYNC_EVENTS_H_ */ |