mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-18 01:52:05 -05:00
9e73f87218
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
33 lines
599 B
C
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 */
|