X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/cbb03be993f1d15fb8ede4e19edafd020bdfbb0a..d294f5825daa3eca345650c670593115e0277d3b:/client/sleep.h

diff --git a/client/sleep.h b/client/sleep.h
index 1ff4e677..81e1dea0 100644
--- a/client/sleep.h
+++ b/client/sleep.h
@@ -1,14 +1,27 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// platform-independant sleep macros
+//-----------------------------------------------------------------------------
+
 #ifndef SLEEP_H__
 #define SLEEP_H__
 
-#ifdef WIN32
-#include <windows.h>
-#define sleep(n) Sleep(1000 * n)
-#define msleep(n) Sleep(n)
+#ifdef _WIN32
+# include <windows.h>
+# define sleep(n) Sleep(1000 * n)
+# define msleep(n) Sleep(n)
 #else
-#include <unistd.h>
-#define msleep(n) usleep(1000 * n)
-#endif
+# include <inttypes.h>
+# include <unistd.h>
+  void nsleep(uint64_t n);
+# define msleep(n) nsleep(1000000 * n)
+# define usleep(n) nsleep(1000 * n)
+#endif // _WIN32
 
-#endif
+#endif // SLEEP_H__