summaryrefslogtreecommitdiff
path: root/libcore/helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcore/helpers.c')
-rw-r--r--libcore/helpers.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libcore/helpers.c b/libcore/helpers.c
index 9fb0bdf..e195c37 100644
--- a/libcore/helpers.c
+++ b/libcore/helpers.c
@@ -213,6 +213,19 @@ void cStopWatch::Stop(const char* message) {
dsyslog("skindesigner: %s - needed %d ms", message, (int)(cTimeMs::Now() - start));
}
+string GetTimeString(int seconds) {
+ time_t sec(seconds);
+ tm *p = gmtime(&sec);
+ int hours = p->tm_hour;
+ int mins = p->tm_min;
+ int secs = p->tm_sec;
+ if (hours > 0) {
+ return *cString::sprintf("%d:%02d:%02d", hours, mins, secs);
+ }
+ return *cString::sprintf("%02d:%02d", mins, secs);;
+}
+
+
//View Helpers
string GetScreenResolutionString(int width, int height, bool *isHD) {
string name = "";