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

This commit is contained in:
shubhendra
2021-02-25 15:58:45 +05:30
parent 512133e14b
commit 644291c028
5 changed files with 6 additions and 18 deletions

View File

@@ -41,7 +41,7 @@ func NewLog(out io.Writer) *Log {
func debugLogQueies(alias *alias, operaton, query string, t time.Time, err error, args ...interface{}) {
var logMap = make(map[string]interface{})
sub := time.Now().Sub(t) / 1e5
sub := time.Since(t) / 1e5
elsp := float64(int(sub)) / 10.0
logMap["cost_time"] = elsp
flag := " OK"