fix 32-bit timer overflow and typo in base64 error message
This commit is contained in:
parent
38c83660fa
commit
9a4a25e3e0
2 changed files with 2 additions and 2 deletions
|
|
@ -121,7 +121,7 @@ proc base64decode*(i: InputStream, o: OutputStream) {.fsMultiSync.} =
|
||||||
inputChar(d)
|
inputChar(d)
|
||||||
outputChar(c shl 6 or d shr 0)
|
outputChar(c shl 6 or d shr 0)
|
||||||
elif i.readable:
|
elif i.readable:
|
||||||
raise newException(ValueError, "The input stream has insufficient nymber of bytes for base64 decoding")
|
raise newException(ValueError, "The input stream has insufficient number of bytes for base64 decoding")
|
||||||
|
|
||||||
close o
|
close o
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ when fsAsyncSupport:
|
||||||
template timeit(timerVar: var Nanos, code: untyped) =
|
template timeit(timerVar: var Nanos, code: untyped) =
|
||||||
let t0 = getTicks()
|
let t0 = getTicks()
|
||||||
code
|
code
|
||||||
timerVar = int(getTicks() - t0) div 1000000
|
timerVar = int64(getTicks() - t0) div 1000000
|
||||||
|
|
||||||
proc getOutput(sp: AsyncInputStream, T: type string): Future[string] {.async.} =
|
proc getOutput(sp: AsyncInputStream, T: type string): Future[string] {.async.} =
|
||||||
# this proc is a quick hack to let the test pass
|
# this proc is a quick hack to let the test pass
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue