]> Cypherpunks.ru repositories - nncp.git/commitdiff
Convenient time.Since()
authorSergey Matveev <stargrave@stargrave.org>
Thu, 23 Mar 2023 10:04:33 +0000 (13:04 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 23 Mar 2023 10:04:33 +0000 (13:04 +0300)
src/sp.go

index 115b39ef61a2ceeba749cc8c9acfa5c722066489..3bef9c3cf63105d68ee5d9d14ab16bee1e048134 100644 (file)
--- a/src/sp.go
+++ b/src/sp.go
@@ -1119,7 +1119,7 @@ func (state *SPState) Wait() bool {
        state.wg.Wait()
        close(state.payloads)
        close(state.pings)
-       state.Duration = time.Now().Sub(state.started)
+       state.Duration = time.Since(state.started)
        state.dirUnlock()
        state.RxSpeed = state.RxBytes
        state.TxSpeed = state.TxBytes