From 83971cf1535bbcda26e8ccf5218f14adbc91c579 Mon Sep 17 00:00:00 2001 From: thindil Date: Sat, 23 Mar 2024 04:47:14 +0000 Subject: [PATCH] feat: moved setting start time to the beginning of the program, for better measurement FossilOrigin-Name: d24a397e93e18c9ae032bae9ac8e7f991db3130f9e377edf2f55af6890880dc5 --- src/main.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.nim b/src/main.nim index 414de63..607ce13 100644 --- a/src/main.nim +++ b/src/main.nim @@ -55,7 +55,9 @@ proc main() {.raises: [], tags: [ReadIOEffect, WriteIOEffect, RootEffect], ## The main procedure of the program # Set the logger, where the program output will be send body: - let logger: ConsoleLogger = newColoredLogger( + let + startTime: float = cpuTime() + logger: ConsoleLogger = newColoredLogger( fmtStr = "[$time] $levelname ") addHandler(handler = logger) setLogFilter(lvl = lvlInfo) @@ -74,7 +76,6 @@ proc main() {.raises: [], tags: [ReadIOEffect, WriteIOEffect, RootEffect], resultCode: int = QuitSuccess configSections: int = 0 globalShowSummary: bool = false - let startTime: float = cpuTime() # Check source code files with the selected rules block checkingCode: while configSections > -1: