use new type names
This commit is contained in:
parent
a730a974ed
commit
adfdb4623d
1 changed files with 5 additions and 5 deletions
|
|
@ -13,7 +13,7 @@
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
import winlean, os, strutils, math
|
import winlean, os, strutils, math
|
||||||
|
|
||||||
proc `-`(a, b: TFILETIME): int64 = a.rdFileTime - b.rdFileTime
|
proc `-`(a, b: FILETIME): int64 = a.rdFileTime - b.rdFileTime
|
||||||
elif defined(linux):
|
elif defined(linux):
|
||||||
from cpuinfo import countProcessors
|
from cpuinfo import countProcessors
|
||||||
|
|
||||||
|
|
@ -25,14 +25,14 @@ type
|
||||||
|
|
||||||
ThreadPoolState* = object
|
ThreadPoolState* = object
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
prevSysKernel, prevSysUser, prevProcKernel, prevProcUser: TFILETIME
|
prevSysKernel, prevSysUser, prevProcKernel, prevProcUser: FILETIME
|
||||||
calls*: int
|
calls*: int
|
||||||
|
|
||||||
proc advice*(s: var ThreadPoolState): ThreadPoolAdvice =
|
proc advice*(s: var ThreadPoolState): ThreadPoolAdvice =
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
var
|
var
|
||||||
sysIdle, sysKernel, sysUser,
|
sysIdle, sysKernel, sysUser,
|
||||||
procCreation, procExit, procKernel, procUser: TFILETIME
|
procCreation, procExit, procKernel, procUser: FILETIME
|
||||||
if getSystemTimes(sysIdle, sysKernel, sysUser) == 0 or
|
if getSystemTimes(sysIdle, sysKernel, sysUser) == 0 or
|
||||||
getProcessTimes(Handle(-1), procCreation, procExit,
|
getProcessTimes(Handle(-1), procCreation, procExit,
|
||||||
procKernel, procUser) == 0:
|
procKernel, procUser) == 0:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue