Misc. tidy up.
This commit is contained in:
parent
03d8b2b471
commit
9daf523d73
|
@ -112,13 +112,13 @@ char *timeToString(long millis, int showHours)
|
||||||
int hours, minutes, seconds;
|
int hours, minutes, seconds;
|
||||||
|
|
||||||
seconds = millis / FPS;
|
seconds = millis / FPS;
|
||||||
minutes = (seconds / 60) % 60;
|
minutes = (seconds / FPS) % 60;
|
||||||
hours = seconds / (60 * 60);
|
hours = seconds / (FPS * FPS);
|
||||||
seconds %= 60;
|
seconds %= 60;
|
||||||
|
|
||||||
if (showHours)
|
if (showHours)
|
||||||
{
|
{
|
||||||
sprintf(TIME, "%dh:%02dm:%02ds", hours, minutes, seconds);
|
sprintf(TIME, "%dh %02dm %02ds", hours, minutes, seconds);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue