Move time formatting to BTimeformat.

* Harmonize API for all B*Format to take an output BString by reference
as the first parameter,
* Move the FormatTime methods from BLocale to BTimeFormat
* Adjust all callers for BTimeFormat, BTimeUnitFormat and
BDurationFormat.
This commit is contained in:
Adrien Destugues
2014-10-01 18:13:35 +02:00
parent 0a925409bc
commit 03b2550ef1
22 changed files with 364 additions and 317 deletions
+1 -1
View File
@@ -1612,7 +1612,7 @@ UptimeToString(char string[], size_t size)
bigtime_t uptime = system_time();
bigtime_t now = (bigtime_t)time(NULL) * 1000000;
formatter.Format(now - uptime, now, &str);
formatter.Format(str, now - uptime, now);
str.CopyInto(string, 0, size);
string[std::min((size_t)str.Length(), size)] = '\0';