bugfix: times.epochTime
This commit is contained in:
parent
3dd67d20fc
commit
ed887e67e9
4 changed files with 14 additions and 15 deletions
|
|
@ -69,7 +69,7 @@ proc defaultFilename*(): string =
|
|||
proc substituteLog*(frmt: string): string =
|
||||
## converts $date to the current date
|
||||
## converts $time to the current time
|
||||
## converts $app to getApplicationFilename()
|
||||
## converts $app to getAppFilename()
|
||||
## converts
|
||||
result = ""
|
||||
var i = 0
|
||||
|
|
@ -80,7 +80,7 @@ proc substituteLog*(frmt: string): string =
|
|||
else:
|
||||
inc(i)
|
||||
var v = ""
|
||||
var app = getApplicationFilename()
|
||||
var app = getAppFilename()
|
||||
while frmt[i] in IdentChars:
|
||||
v.add(toLower(frmt[i]))
|
||||
inc(i)
|
||||
|
|
|
|||
|
|
@ -295,8 +295,7 @@ when not defined(ECMAScript):
|
|||
when defined(posix):
|
||||
var a: Ttimeval
|
||||
posix_gettimeofday(a)
|
||||
result = toFloat(a.tv_sec) + toFloat(a.tv_usec)*0.001
|
||||
# why 0.001 instead of 0.00_0001? I don't know.
|
||||
result = toFloat(a.tv_sec) + toFloat(a.tv_usec)*0.00_0001
|
||||
elif defined(windows):
|
||||
var f: winlean.Filetime
|
||||
GetSystemTimeAsFileTime(f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue