more modules updated
This commit is contained in:
parent
00f50f2797
commit
2b6277c964
1 changed files with 3 additions and 3 deletions
|
|
@ -132,9 +132,9 @@ else:
|
||||||
proc hook(st: TStackTrace) {.nimcall.} =
|
proc hook(st: TStackTrace) {.nimcall.} =
|
||||||
if interval == 0:
|
if interval == 0:
|
||||||
hookAux(st, 1)
|
hookAux(st, 1)
|
||||||
elif getticks() - t0 > interval:
|
elif getTicks() - t0 > interval:
|
||||||
hookAux(st, 1)
|
hookAux(st, 1)
|
||||||
t0 = getticks()
|
t0 = getTicks()
|
||||||
|
|
||||||
proc getTotal(x: ptr TProfileEntry): int =
|
proc getTotal(x: ptr TProfileEntry): int =
|
||||||
result = if isNil(x): 0 else: x.total
|
result = if isNil(x): 0 else: x.total
|
||||||
|
|
@ -150,7 +150,7 @@ proc writeProfile() {.noconv.} =
|
||||||
system.profilerHook = nil
|
system.profilerHook = nil
|
||||||
const filename = "profile_results.txt"
|
const filename = "profile_results.txt"
|
||||||
echo "writing " & filename & "..."
|
echo "writing " & filename & "..."
|
||||||
var f: TFile
|
var f: File
|
||||||
if open(f, filename, fmWrite):
|
if open(f, filename, fmWrite):
|
||||||
sort(profileData, cmpEntries)
|
sort(profileData, cmpEntries)
|
||||||
writeln(f, "total executions of each stack trace:")
|
writeln(f, "total executions of each stack trace:")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue