(t int64)
| 36 | } |
| 37 | |
| 38 | func FormatTime(t int64) string { |
| 39 | if t < 1000 { |
| 40 | return strconv.FormatInt(t, 10) + "ms" |
| 41 | } |
| 42 | if t < 1000000 { |
| 43 | return fmt.Sprintf("%.1fs", float64(t)/1000) |
| 44 | } |
| 45 | if t < 1000000000 { |
| 46 | return fmt.Sprintf("%.1fmin", float64(t)/1000000) |
| 47 | } |
| 48 | if t < 1000000000000 { |
| 49 | return fmt.Sprintf("%.1fhour", float64(t)/1000000000) |
| 50 | } |
| 51 | return fmt.Sprintf("%.1D", float64(t)/1000000000000) |
| 52 | } |
| 53 | |
| 54 | func FormatByte(b int64) string { |
| 55 | const ( |
no outgoing calls
no test coverage detected