I have a time represented as a floating-point number (in seconds). I need a function to convert this representation to string format. Somethins like this:
/// <summary>
/// Get time from a float representation.
/// </summary>
/// <param name="f">Time in a floating-point number.</param>
/// <returns>Time in a string format.</returns>
string GetTime(float f)
{
return f.ToString(); // string format is hh:mm:ss (h-hours, m-minutes, s-seconds)
}
For example, 10.0 converts to 00:00:10, 67.0 converts to 00:01:07