From 037e8e0cb128734a447d472ea2345eea02ee65b6 Mon Sep 17 00:00:00 2001 From: louis Date: Sun, 2 Nov 2014 17:32:22 +0100 Subject: call drawdevices only every 500ms, added profiling code --- libcore/helpers.c | 5 ++++- libcore/helpers.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'libcore') diff --git a/libcore/helpers.c b/libcore/helpers.c index 4ca2272..4da97f7 100644 --- a/libcore/helpers.c +++ b/libcore/helpers.c @@ -167,9 +167,12 @@ vector& splitstring::split(char delim, int rep) { return flds; } -cStopWatch::cStopWatch(void) { +cStopWatch::cStopWatch(const char* message) { start = cTimeMs::Now(); last = start; + if (message) { + dsyslog("skindesigner: Starting StopWatch %s", message); + } } void cStopWatch::Report(const char* message) { diff --git a/libcore/helpers.h b/libcore/helpers.h index 2a92efb..abfae6d 100644 --- a/libcore/helpers.h +++ b/libcore/helpers.h @@ -33,7 +33,7 @@ private: uint64_t start; uint64_t last; public: - cStopWatch(void); + cStopWatch(const char* message = NULL); ~cStopWatch(void) {}; void Report(const char* message); void Stop(const char* message); -- cgit v1.2.3