replace time.Now().Sub with time.Since

This commit is contained in:
shinytang6
2019-03-18 23:57:26 +08:00
parent 66674f5496
commit 5c9f4d9dc6
14 changed files with 20 additions and 20 deletions

View File

@@ -828,7 +828,7 @@ func BenchmarkAuthorization(b *testing.B) {
},
},
})
diff := time.Now().Sub(start)
diff := time.Since(start)
atomic.AddInt64(&writes, 1)
switch {
case diff < time.Millisecond: