Mercurial > games > semicongine
changeset 1310:3f79b3efca95
fix: timing not working
author | sam <sam@basx.dev> |
---|---|
date | Fri, 09 Aug 2024 07:18:24 +0700 |
parents | 53a8766292a7 |
children | b22c3b7bc026 |
files | semicongine/core.nim semicongine/core/utils.nim |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/semicongine/core.nim Thu Aug 08 16:00:32 2024 +0700 +++ b/semicongine/core.nim Fri Aug 09 07:18:24 2024 +0700 @@ -1,10 +1,12 @@ import std/macros import std/math +import std/monotimes import std/os import std/paths import std/strutils import std/strformat import std/tables +import std/times import std/typetraits const RESOURCEROOT {.hint[XDeclaredButNotUsed]: off.} = "resources"
--- a/semicongine/core/utils.nim Thu Aug 08 16:00:32 2024 +0700 +++ b/semicongine/core/utils.nim Fri Aug 09 07:18:24 2024 +0700 @@ -42,4 +42,4 @@ template TimeAndLog*(name: string, body: untyped): untyped = let t0 = getMonoTime() body - echo name, ": ", (getMonoTime() - t0).inNanoseconds.float / 1_000_000 + echo name, ": ", (getMonoTime() - t0).inNanoseconds.float / 1_000_000, "ms"