Merge branch 'upstream/main'

This commit is contained in:
Laisky.Cai
2025-02-01 13:17:28 +00:00
49 changed files with 3875 additions and 1600 deletions

View File

@@ -14,3 +14,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()
}