mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-14 23:00:27 +00:00
feat: show stream & elapsed time in log detail
This commit is contained in:
@@ -13,3 +13,8 @@ func GetTimeString() string {
|
||||
now := time.Now()
|
||||
return fmt.Sprintf("%s%d", now.Format("20060102150405"), now.UnixNano()%1e9)
|
||||
}
|
||||
|
||||
// CalcElapsedTime return the elapsed time in milliseconds (ms)
|
||||
func CalcElapsedTime(start time.Time) int64 {
|
||||
return time.Now().Sub(start).Milliseconds()
|
||||
}
|
||||
|
Reference in New Issue
Block a user