chore: use time.Now() instead of timex.Time() because go optimized it (#1860)

This commit is contained in:
Kevin Wan
2022-05-03 19:51:47 +08:00
committed by GitHub
parent ac321fc146
commit bab72b7630
7 changed files with 21 additions and 22 deletions

View File

@@ -15,8 +15,3 @@ func Now() time.Duration {
func Since(d time.Duration) time.Duration {
return time.Since(initTime) - d
}
// Time returns current time, the same as time.Now().
func Time() time.Time {
return initTime.Add(Now())
}