tool.go 313 B

1234567891011121314151617
  1. package conf
  2. import (
  3. "go-common/library/log"
  4. "time"
  5. )
  6. // RecordTimeCostLog 记录日志
  7. func RecordTimeCostLog(nowTime int64, desc string) {
  8. log.Info(desc+"|%d", nowTime)
  9. }
  10. // RecordTimeCost ...
  11. // 记录时间
  12. func RecordTimeCost() (NowTime int64) {
  13. return time.Now().UnixNano() / 1000000 // 用毫秒
  14. }