Commits (1)
...@@ -690,10 +690,9 @@ char* os_cmdshell(void) ...@@ -690,10 +690,9 @@ char* os_cmdshell(void)
return(shell); return(shell);
} }
/****************************************************************/ /********************************************************/
/* Microsoft (DOS/Win32) real-time system clock implementation. */ /* Stupid real-time system clock implementation. */
/****************************************************************/ /********************************************************/
#ifdef __unix__
clock_t msclock(void) clock_t msclock(void)
{ {
long double t = roundl(xp_timer() * 1000); long double t = roundl(xp_timer() * 1000);
...@@ -705,7 +704,6 @@ clock_t msclock(void) ...@@ -705,7 +704,6 @@ clock_t msclock(void)
return (clock_t)t; return (clock_t)t;
} }
#endif
/****************************************************************************/ /****************************************************************************/
/* Skips all white-space chars at beginning of 'str' */ /* Skips all white-space chars at beginning of 'str' */
......
...@@ -378,14 +378,8 @@ DLLEXPORT char* byte_count_to_str(int64_t bytes, char* str, size_t size); ...@@ -378,14 +378,8 @@ DLLEXPORT char* byte_count_to_str(int64_t bytes, char* str, size_t size);
DLLEXPORT char* byte_estimate_to_str(int64_t bytes, char* str, size_t size, ulong unit, int precision); DLLEXPORT char* byte_estimate_to_str(int64_t bytes, char* str, size_t size, ulong unit, int precision);
/* Microsoft (e.g. DOS/Win32) real-time system clock API (ticks since process started) */ /* Microsoft (e.g. DOS/Win32) real-time system clock API (ticks since process started) */
typedef clock_t msclock_t; #define MSCLOCKS_PER_SEC 1000
#if defined(_WIN32) || defined(__OS2__) msclock_t msclock(void);
#define MSCLOCKS_PER_SEC CLOCKS_PER_SEC /* e.g. 18.2 on DOS, 1000.0 on Win32 */
#define msclock() clock()
#else
#define MSCLOCKS_PER_SEC 1000
msclock_t msclock(void);
#endif
DLLEXPORT BOOL check_pid(pid_t); DLLEXPORT BOOL check_pid(pid_t);
DLLEXPORT BOOL terminate_pid(pid_t); DLLEXPORT BOOL terminate_pid(pid_t);
......