diff options
-rw-r--r-- | include/Platform.h | 7 | ||||
-rw-r--r-- | include/SString.h | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/Platform.h b/include/Platform.h index 5281260c4..fc0e1fe79 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -386,6 +386,13 @@ public: void Show(Point pt, Window &w); }; +class ElapsedTime { + double beginTime; +public: + ElapsedTime(); + double Duration(bool reset=false); +}; + /** * Platform class used to retrieve system wide parameters such as double click speed * and chrome colour. Not a creatable object, more of a module with several functions. diff --git a/include/SString.h b/include/SString.h index 199d144b5..ff97c0c76 100644 --- a/include/SString.h +++ b/include/SString.h @@ -91,6 +91,12 @@ public: s = StringDup(number); sSize = sLen = (s) ? strlen(s) : 0; } + SString(double d) : sizeGrowth(sizeGrowthDefault) { + char number[32]; + sprintf(number, "%.6f", d); + s = StringDup(number); + sSize = sLen = (s) ? strlen(s) : 0; + } ~SString() { delete []s; s = 0; |