diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2009-10-11 17:03:00 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2009-10-11 17:03:00 +0200 |
commit | 03f6fd904f639fb7210d995759caadf6a83a3859 (patch) | |
tree | 51ca65e5a77490cbe2c20f3c5b70705179887b21 /src/helpers.cpp | |
parent | aebc5db0e1634b7dade9c2b31ef4ffb70829e694 (diff) |
new screen: mpd server info
Diffstat (limited to 'src/helpers.cpp')
-rw-r--r-- | src/helpers.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/helpers.cpp b/src/helpers.cpp index b0242085..c1479efc 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -244,6 +244,14 @@ bool CaseInsensitiveSorting::operator()(const Item &a, const Item &b) return a.type < b.type; } +std::string Timestamp(time_t t) +{ + char result[32]; + tm info; + result[strftime(result, 31, "%x %X", localtime_r(&t, &info))] = 0; + return result; +} + void UpdateSongList(Menu<Song> *menu) { bool bold = 0; |