]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/sp.go
Convenient time.Since()
[nncp.git] / 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