From: Sergey Matveev Date: Thu, 23 Mar 2023 10:04:33 +0000 (+0300) Subject: Convenient time.Since() X-Git-Tag: v8.8.3^2~8 X-Git-Url: http://www.git.cypherpunks.ru/?p=nncp.git;a=commitdiff_plain;h=4fc153e6be51fa08b98ca45704f84ea3cfb66afc Convenient time.Since() --- diff --git a/src/sp.go b/src/sp.go index 115b39e..3bef9c3 100644 --- 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