[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
commit 496bd790e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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: [].}