FormatTime
Formats a given TimeSpan object as a string in the format "X ms", "X s", or "X min", depending on the length of the time span.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: Unity.ProjectAuditor.Editor.Utils
- Assembly: UnityEditor
FormatTime(TimeSpan)
Formats a given TimeSpan object as a string in the format "X ms", "X s", or "X min", depending on the length of the time span.
public static string FormatTime(TimeSpan timeSpan)
Parameters
The TimeSpan object to format.
Returns
Type | Description |
|---|---|
| string | A string representation of the input TimeSpan object. |
FormatTime(float)
Formats a given time value as a string in the format "X ms", "X s", or "X min"
public static string FormatTime(float timeMs)
Parameters
The time value to format, in milliseconds.
Returns
Type | Description |
|---|---|
| string | A string representation of the input float value. |