package handlers import "time" func millisToDuration(ms int64) time.Duration { if ms <= 0 { return 0 } return time.Duration(ms) * time.Millisecond }