Stop generating "xxxx, 0 second" uptime string.
How smallish and useless contribution I could do... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19352 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
464cd15f0a
commit
b901ec2715
@ -598,10 +598,14 @@ UptimeToString(char string[], size_t size)
|
||||
str != string ? ", " : "",
|
||||
minutes, minutes > 1 ? "s" : "");
|
||||
}
|
||||
// Always show second(s)...
|
||||
str += snprintf(str, size - strlen(string), "%s%lld second%s",
|
||||
|
||||
if (seconds || str == string) {
|
||||
// Haiku would be well-known to boot very fast.
|
||||
// Let's be ready to handle below minute uptime, zero second included ;-)
|
||||
str += snprintf(str, size - strlen(string), "%s%lld second%s",
|
||||
str != string ? ", " : "",
|
||||
seconds, seconds > 1 ? "s" : "");
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user