[std/times]getTime now uses high resolution API on windows (#17901)

This commit is contained in:
flywind
2021-06-24 03:33:19 +08:00
committed by GitHub
parent 63456c6d7f
commit 496bd790e1
2 changed files with 6 additions and 2 deletions

View File

@@ -928,6 +928,9 @@ proc getProcessTimes*(hProcess: Handle; lpCreationTime, lpExitTime,
lpKernelTime, lpUserTime: var FILETIME): WINBOOL {.stdcall,
dynlib: "kernel32", importc: "GetProcessTimes".}
proc getSystemTimePreciseAsFileTime*(lpSystemTimeAsFileTime: var FILETIME) {.
importc: "GetSystemTimePreciseAsFileTime", dynlib: "kernel32", stdcall, sideEffect.}
type inet_ntop_proc = proc(family: cint, paddr: pointer, pStringBuffer: cstring,
stringBufSize: int32): cstring {.gcsafe, stdcall, tags: [].}