Skip to content
Snippets Groups Projects
Commit 1164252e authored by rswindell's avatar rswindell
Browse files

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.
parent fa04e7b0
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment