diff options
| author | mitchell <unknown> | 2018-05-06 21:22:30 -0400 |
|---|---|---|
| committer | mitchell <unknown> | 2018-05-06 21:22:30 -0400 |
| commit | 724309f4b71d1d991a754d0ad821de3861b6a211 (patch) | |
| tree | f24a11e3c550ad8ba46b92089a2ef1d3aff34663 /cocoa/PlatCocoa.mm | |
| parent | 8971ac9fe89f01e717ad21126213ac8887fe373d (diff) | |
| download | scintilla-mirror-724309f4b71d1d991a754d0ad821de3861b6a211.tar.gz | |
Backport: Use <chrono> for platform-independent timing and remove ElapsedTime. Also use #if for painting measurement as there are 7 sections of code to enable.
Backport of changeset 6741:af5d9064c25c.
Diffstat (limited to 'cocoa/PlatCocoa.mm')
| -rw-r--r-- | cocoa/PlatCocoa.mm | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index cef776c7f..bbc8ba35c 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1971,34 +1971,6 @@ void Menu::Show(Point, Window &) // takes care to show it properly. } -//----------------- ElapsedTime -------------------------------------------------------------------- - -// ElapsedTime is used for precise performance measurements during development -// and not for anything a user sees. - -ElapsedTime::ElapsedTime() { - struct timeval curTime; - gettimeofday( &curTime, NULL ); - - bigBit = curTime.tv_sec; - littleBit = curTime.tv_usec; -} - -double ElapsedTime::Duration(bool reset) { - struct timeval curTime; - gettimeofday( &curTime, NULL ); - long endBigBit = curTime.tv_sec; - long endLittleBit = curTime.tv_usec; - double result = 1000000.0 * (endBigBit - bigBit); - result += endLittleBit - littleBit; - result /= 1000000.0; - if (reset) { - bigBit = endBigBit; - littleBit = endLittleBit; - } - return result; -} - //----------------- Platform ----------------------------------------------------------------------- ColourDesired Platform::Chrome() |
