📜  unity string 格式化时间 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:20.046000             🧑  作者: Mango

代码示例1
public string FormatTime( float time )
{
int minutes = (int) time / 60000 ;
int seconds = (int) time / 1000 - 60 * minutes;
int milliseconds = (int) time - minutes * 60000 - 1000 * seconds;
return string. Format("{0:00}:{1:00}:{2:000}", minutes, seconds, milliseconds );
}