Added MSVCRT_CLOCKS_PER_SEC define.
This commit is contained in:
parent
13088b8901
commit
46e922bba5
|
@ -543,6 +543,8 @@ struct MSVCRT__stati64 {
|
|||
#define MSVCRT__PC_53 0x00010000
|
||||
#define MSVCRT__PC_64 0x00000000
|
||||
|
||||
#define MSVCRT_CLOCKS_PER_SEC 1000
|
||||
|
||||
void MSVCRT_free(void*);
|
||||
void* MSVCRT_malloc(MSVCRT_size_t);
|
||||
void* MSVCRT_calloc(MSVCRT_size_t,MSVCRT_size_t);
|
||||
|
|
|
@ -358,6 +358,7 @@ void test_defines()
|
|||
CHECK_DEF("LC_TIME", LC_TIME, MSVCRT_LC_TIME);
|
||||
CHECK_DEF("LC_MIN", LC_MIN, MSVCRT_LC_MIN);
|
||||
CHECK_DEF("LC_MAX", LC_MAX, MSVCRT_LC_MAX);
|
||||
CHECK_DEF("CLOCKS_PER_SEC", CLOCKS_PER_SEC, MSVCRT_CLOCKS_PER_SEC);
|
||||
CHECK_DEF("_HEAPEMPTY", _HEAPEMPTY, MSVCRT__HEAPEMPTY);
|
||||
CHECK_DEF("_HEAPOK", _HEAPOK, MSVCRT__HEAPOK);
|
||||
CHECK_DEF("_HEAPBADBEGIN", _HEAPBADBEGIN, MSVCRT__HEAPBADBEGIN);
|
||||
|
|
|
@ -203,7 +203,7 @@ MSVCRT_clock_t MSVCRT_clock(void)
|
|||
ktime = ((ULONGLONG)ftk.dwHighDateTime << 32) | ftk.dwLowDateTime;
|
||||
utime = ((ULONGLONG)ftu.dwHighDateTime << 32) | ftu.dwLowDateTime;
|
||||
|
||||
clock = ((utime + ktime) / TICKSPERSEC) * CLOCKS_PER_SEC;
|
||||
clock = (utime + ktime) / (TICKSPERSEC / MSVCRT_CLOCKS_PER_SEC);
|
||||
|
||||
return clock;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue