From 1164252eb75fe33ce13aea30b1576200051e9131 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 12 Oct 2005 21:45:46 +0000 Subject: [PATCH] Changed *nix msclock() to return msclock_t instead of clock_t. MSCLOCKS_PER_SEC is no longer hard-coded to 1000 on non-*nix platforms ("ms" stands for "Microsoft", not "milliseconds"). Added comment with example (floating point) values for MSCLOCKS_PER_SEC on non-*nix platforms. --- src/xpdev/genwrap.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xpdev/genwrap.h b/src/xpdev/genwrap.h index 9cc23c6779..8076d241a2 100644 --- a/src/xpdev/genwrap.h +++ b/src/xpdev/genwrap.h @@ -298,11 +298,12 @@ DLLEXPORT char DLLCALL c_unescape_char(char ch); /* Millisecond clock */ typedef clock_t msclock_t; -#define MSCLOCKS_PER_SEC 1000 #if defined(_WIN32) - #define msclock() clock() + #define MSCLOCKS_PER_SEC CLOCKS_PER_SEC /* e.g. 18.2 on DOS, 1000.0 on Win32 */ + #define msclock() clock() #else - clock_t msclock(void); + #define MSCLOCKS_PER_SEC 1000 + msclock_t msclock(void); #endif #if defined(__cplusplus) -- GitLab