diff options
author | Araq <rumpf_a@web.de> | 2015-06-06 11:50:51 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-06-06 11:59:35 +0200 |
commit | adfdb4623dc7f0150a75a1a0d71c439f540111bd (patch) | |
tree | b40e43971643d739857f048cb2816a8672ce96ac /lib/pure/concurrency/cpuload.nim | |
parent | a730a974ed7c585b2f3ade88e06eb308244fa83e (diff) | |
download | Nim-adfdb4623dc7f0150a75a1a0d71c439f540111bd.tar.gz |
use new type names
Diffstat (limited to 'lib/pure/concurrency/cpuload.nim')
-rw-r--r-- | lib/pure/concurrency/cpuload.nim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/pure/concurrency/cpuload.nim b/lib/pure/concurrency/cpuload.nim index 1f3f54056..22598b5c9 100644 --- a/lib/pure/concurrency/cpuload.nim +++ b/lib/pure/concurrency/cpuload.nim @@ -13,7 +13,7 @@ when defined(windows): 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): from cpuinfo import countProcessors @@ -25,16 +25,16 @@ type ThreadPoolState* = object when defined(windows): - prevSysKernel, prevSysUser, prevProcKernel, prevProcUser: TFILETIME + prevSysKernel, prevSysUser, prevProcKernel, prevProcUser: FILETIME calls*: int proc advice*(s: var ThreadPoolState): ThreadPoolAdvice = when defined(windows): var sysIdle, sysKernel, sysUser, - procCreation, procExit, procKernel, procUser: TFILETIME + procCreation, procExit, procKernel, procUser: FILETIME if getSystemTimes(sysIdle, sysKernel, sysUser) == 0 or - getProcessTimes(Handle(-1), procCreation, procExit, + getProcessTimes(Handle(-1), procCreation, procExit, procKernel, procUser) == 0: return doNothing if s.calls > 0: @@ -57,7 +57,7 @@ proc advice*(s: var ThreadPoolState): ThreadPoolAdvice = s.prevProcKernel = procKernel s.prevProcUser = procUser elif defined(linux): - proc fscanf(c: File, frmt: cstring) {.varargs, importc, + proc fscanf(c: File, frmt: cstring) {.varargs, importc, header: "<stdio.h>".} var f = open("/proc/loadavg") |