diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2011-04-30 19:10:56 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:16:47 +0300 |
commit | c4cbac493fbb331e1306f776f16dd667d27eed93 (patch) | |
tree | 2a7ebf268186cde2ebe3666f4d5d1e2641910d8d /platform | |
parent | 0a36f3ceea006d626a52b821a4b02134a106696c (diff) |
Removed Platform::TimeString() and replaced with ctime()
Diffstat (limited to 'platform')
-rw-r--r-- | platform/platform.hpp | 2 | ||||
-rw-r--r-- | platform/qtplatform.cpp | 27 |
2 files changed, 0 insertions, 29 deletions
diff --git a/platform/platform.hpp b/platform/platform.hpp index 10d154f4ef..fb3279fa6e 100644 --- a/platform/platform.hpp +++ b/platform/platform.hpp @@ -18,8 +18,6 @@ public: /// Time in seconds passed from application start virtual double TimeInSec() const = 0; - virtual string const TimeString() const = 0; - /// @return always the same writable dir for current user with slash at the end virtual string WritableDir() const = 0; /// @return full path to file in user's writable directory diff --git a/platform/qtplatform.cpp b/platform/qtplatform.cpp index 40622e7315..d068637258 100644 --- a/platform/qtplatform.cpp +++ b/platform/qtplatform.cpp @@ -414,33 +414,6 @@ public: { return 512 + 256; } - - string const TimeString() const - { - time_t rawtime; - time(&rawtime); - tm * ltime; - ltime = localtime(&rawtime); - - static char const * wday_name[7] = { - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" - }; - - static char const * mon_name[12] = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - - static char result[26]; - - sprintf(result, "%s_%s_%d_%d:%d:%d_%d", - wday_name[ltime->tm_wday], - mon_name[ltime->tm_mon], - ltime->tm_mday, ltime->tm_hour, - ltime->tm_min, ltime->tm_sec, - 1900 + ltime->tm_year); - return string(result); - } }; extern "C" Platform & GetPlatform() |