Added format_{big,nano}time() versions returning a BString.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34587 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-12-09 15:22:20 +00:00
parent ac3566cd6a
commit f3156fffd0
+17
View File
@@ -71,6 +71,14 @@ format_bigtime(bigtime_t time, char* buffer, size_t bufferSize)
}
static inline BString
format_bigtime(bigtime_t time)
{
char buffer[64];
format_bigtime(time, buffer, sizeof(buffer));
return BString(buffer);
}
static inline const char*
format_nanotime(nanotime_t time, char* buffer, size_t bufferSize)
@@ -84,4 +92,13 @@ format_nanotime(nanotime_t time, char* buffer, size_t bufferSize)
}
static inline BString
format_nanotime(nanotime_t time)
{
char buffer[64];
format_nanotime(time, buffer, sizeof(buffer));
return BString(buffer);
}
#endif // TIME_UTILS_H