2017-07-28 02:48:49 +08:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// 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.
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// utilities requiring Posix library functions
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef UTIL_POSIX_H__
|
|
|
|
#define UTIL_POSIX_H__
|
|
|
|
|
2019-08-08 22:57:33 +08:00
|
|
|
#include "common.h"
|
2017-07-28 02:48:49 +08:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
# include <windows.h>
|
|
|
|
# define sleep(n) Sleep(1000 *(n))
|
|
|
|
# define msleep(n) Sleep((n))
|
|
|
|
#else
|
2019-08-08 22:57:33 +08:00
|
|
|
void msleep(uint32_t n); // sleep n milliseconds
|
2017-07-28 02:48:49 +08:00
|
|
|
#endif // _WIN32
|
|
|
|
|
2019-08-08 22:57:33 +08:00
|
|
|
uint64_t msclock(void); // a milliseconds clock
|
2017-07-28 02:48:49 +08:00
|
|
|
|
|
|
|
#endif
|