aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2001-11-15 00:49:20 +0000
committernyamatongwe <unknown>2001-11-15 00:49:20 +0000
commitaa63b1842ce03c992bd695c4dd7d3d940bf47f64 (patch)
treebcbc3dea4f72d89c37ec8ff25f9b15e90b8f8400
parent07e096fe7048742e3254cbd0fddb1299495f4bc1 (diff)
downloadscintilla-mirror-aa63b1842ce03c992bd695c4dd7d3d940bf47f64.tar.gz
Added construction from double to SString.
Added ElapsedTime class to Platform.
-rw-r--r--include/Platform.h7
-rw-r--r--include/SString.h6
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;