2018-05-05 17:00:56 +03:00

13 lines
227 B
Go

package timeutils
import (
"fmt"
"time"
"github.com/sirupsen/logrus"
)
func Track(now time.Time, format string, args ...interface{}) {
logrus.Infof("[timing] %s took %s", fmt.Sprintf(format, args...), time.Since(now))
}