time.Now().Sub(t)
instead of time.Since(t)
SCC-S1012123
124 start := time.Now()
125 p.Stop()
126 worktime := time.Now().Sub(start) //nolint:gosimple127
128 assert.True(worktime.Seconds() < 1, "maxUpdatesPerSecond: %d, workers: %d", maxUpdatesPerSecond, workers)
129 })
The time.Since(t)
helper has the same effect as using time.Now().Sub(t)
.
time.Since(t)
returns the time elapsed since t
. It is shorthand for
time.Now().Sub(t)
.
time.Now().Sub(x)
time.Since(x)