WSJT-X/libm65/sleep.h
Joe Taylor 04dcf0a528 Major changes to the MAP65 branch. This branch is now a copy of
MAP65 v2.3.0, r631, as checked out from the SVN repository on
pulsar.princeton.edu.  If all goes well with this commit, subsequent
MAP65 development will use the Berlios repository.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2461 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2012-05-22 14:28:39 +00:00

33 lines
599 B
C

/*
* sleep.h 1.0 02/03/10
*
* Defines cross-platform sleep, usleep, etc.
*
* By Wu Yongwei
*
*/
#ifndef _SLEEP_H
#define _SLEEP_H
#ifdef _WIN32
# if defined(_NEED_SLEEP_ONLY) && (defined(_MSC_VER) || defined(__MINGW32__))
# include <stdlib.h>
# define sleep(t) _sleep((t) * 1000)
# else
# include <windows.h>
# define sleep(t) Sleep((t) * 1000)
# endif
# ifndef _NEED_SLEEP_ONLY
# define msleep(t) Sleep(t)
# define usleep(t) Sleep((t) / 1000)
# endif
#else
# include <unistd.h>
# ifndef _NEED_SLEEP_ONLY
# define msleep(t) usleep((t) * 1000)
# endif
#endif
#endif /* _SLEEP_H */