--- src/luafuncs.cpp.orig	2013-09-18 14:19:18.000000000 +0200
+++ src/luafuncs.cpp	2013-09-18 14:19:36.000000000 +0200
@@ -942,10 +942,10 @@
   ms=ms%1000;
   for (int i=0; i<secs; i++) { // Just sleep for one second at a time, to give user a chance to cancel
     if (!breathe(L)) { return 0; }
-    fxsleep(1000000);
+    FXThread::sleep(1000000);
   }
   if (!breathe(L)) { return 0; }
-  fxsleep(ms*1000);
+  FXThread::sleep(ms*1000);
   return 0;
 }
 
