]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/sleep.h
Add option -h to dump complete set of supported commands
[proxmark3-svn] / client / sleep.h
index 1ff4e677a3b6771b3dec06dce8671edb629cbba0..81e1dea02eaf96a947b7486b4f3a262f639225aa 100644 (file)
@@ -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__
 
Impressum, Datenschutz