11
11
#include "uv_mapping.h"
12
12
13
13
14
- #define UVWASI__WIN_TIME_AND_RETURN (handle , time ) \
14
+ #define UVWASI__WIN_TIME_AND_RETURN (handle , get_times , time ) \
15
15
do { \
16
16
FILETIME create; \
17
17
FILETIME exit; \
18
18
FILETIME system; \
19
19
FILETIME user; \
20
20
SYSTEMTIME sys_system; \
21
21
SYSTEMTIME sys_user; \
22
- if (0 == GetProcessTimes ((handle), &create, &exit, &system, &user)) { \
22
+ if (0 == get_times ((handle), &create, &exit, &system, &user)) { \
23
23
return uvwasi__translate_uv_error( \
24
24
uv_translate_sys_error(GetLastError()) \
25
25
); \
@@ -137,7 +137,7 @@ uvwasi_errno_t uvwasi__clock_gettime_realtime(uvwasi_timestamp_t* time) {
137
137
138
138
uvwasi_errno_t uvwasi__clock_gettime_process_cputime (uvwasi_timestamp_t * time ) {
139
139
#if defined(_WIN32 )
140
- UVWASI__WIN_TIME_AND_RETURN (GetCurrentProcess (), * time );
140
+ UVWASI__WIN_TIME_AND_RETURN (GetCurrentProcess (), GetProcessTimes , * time );
141
141
#elif defined(CLOCK_PROCESS_CPUTIME_ID ) && \
142
142
!defined(__APPLE__ ) && \
143
143
!defined(__sun )
@@ -150,7 +150,7 @@ uvwasi_errno_t uvwasi__clock_gettime_process_cputime(uvwasi_timestamp_t* time) {
150
150
151
151
uvwasi_errno_t uvwasi__clock_gettime_thread_cputime (uvwasi_timestamp_t * time ) {
152
152
#if defined(_WIN32 )
153
- UVWASI__WIN_TIME_AND_RETURN (GetCurrentThread (), * time );
153
+ UVWASI__WIN_TIME_AND_RETURN (GetCurrentThread (), GetThreadTimes , * time );
154
154
#elif defined(__APPLE__ )
155
155
UVWASI__OSX_THREADTIME_AND_RETURN (* time );
156
156
#elif defined(CLOCK_THREAD_CPUTIME_ID ) && !defined(__sun ) && !defined(__PASE__ )
0 commit comments