Are you sure you want to report the post shown below? This will send an email to the ATVO administrators. Please include a short reason for reporting.
Users reporting for no reason may be locked out.
internal static string ConvertToTimeString(this float seconds, string secFormat = "0.000", bool withMinutes = true, string prefix = "", string def = "")
{
if (seconds <= 0)
return def;
var min = 0;
float sectime;
if (withMinutes)
{
min = (int) (seconds / 60);
sectime = seconds % 60;
}
else
{
sectime = seconds;
}
var sb = new StringBuilder(prefix);
if (min > 0)
sb.Append(min).Append(':').Append(sectime.ToString("0" + secFormat));
else
sb.Append(sectime.ToString(secFormat));
return sb.ToString().Replace(',', '.');
}