diff --git a/das.nim b/das.nim index fee698c..18d25c4 100644 --- a/das.nim +++ b/das.nim @@ -116,7 +116,6 @@ when isMainModule: # generate block and push data info "starting upload to DHT" - let startTime = Moment.now() var futs = newSeq[Future[seq[Node]]]() for s in 0 ..< blocksize: let @@ -127,8 +126,10 @@ when isMainModule: futs.add(nodes[0][0].addValue(key, segment)) - let pass = await allFutures(futs).withTimeout(upload_timeout) - info "uploaded to DHT", by = 0, pass, time = Moment.now() - startTime + let + allFinished = allFutures(futs).withTimeout(upload_timeout) + pass = await allFinished + info "uploaded to DHT", by = 0, pass, time = allFinished.duration # sample proc startSamplingDA(n: discv5_protocol.Protocol): seq[Future[DiscResult[seq[byte]]]] = diff --git a/das.nims b/das.nims index b240795..c20778a 100644 --- a/das.nims +++ b/das.nims @@ -1,2 +1,3 @@ patchFile("chronos", "chronos", "chronosim/chronos") patchFile("nimcrypto", "rijndael", "chronosim/rijndael") +--d:chronosFutureDuration diff --git a/vendor/nim-chronos b/vendor/nim-chronos index 5b9ec08..2f66813 160000 --- a/vendor/nim-chronos +++ b/vendor/nim-chronos @@ -1 +1 @@ -Subproject commit 5b9ec0837c4f6774b68bd9e5ccc36bd79a65e57d +Subproject commit 2f66813f92a4d7cedbd9086c42f6a227be39eed1