summaryrefslogtreecommitdiff
path: root/include/mbgl/util
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-28 12:47:58 -0400
committerKonstantin Käfer <mail@kkaefer.com>2014-10-28 12:47:58 -0400
commitdbddd3c904d34eecdda4bb7d1d0dc30c4ea7e13b (patch)
treec3f40984bd0ec4cf136ad90de871b5e87a55062b /include/mbgl/util
parent602b9da9928e10b55489d2a5c9599107b32dc90a (diff)
downloadqtlocation-mapboxgl-dbddd3c904d34eecdda4bb7d1d0dc30c4ea7e13b.tar.gz
gyp fixes
Diffstat (limited to 'include/mbgl/util')
-rw-r--r--include/mbgl/util/stopwatch.hpp40
-rw-r--r--include/mbgl/util/timer.hpp40
2 files changed, 40 insertions, 40 deletions
diff --git a/include/mbgl/util/stopwatch.hpp b/include/mbgl/util/stopwatch.hpp
new file mode 100644
index 0000000000..663bbb6fc7
--- /dev/null
+++ b/include/mbgl/util/stopwatch.hpp
@@ -0,0 +1,40 @@
+#ifndef MBGL_UTIL_STOPWATCH
+#define MBGL_UTIL_STOPWATCH
+
+#include <mbgl/platform/event.hpp>
+
+#include <string>
+
+namespace mbgl {
+namespace util {
+
+#ifndef DISABLE_STOPWATCH
+class stopwatch {
+public:
+ stopwatch(Event event = Event::General);
+ stopwatch(EventSeverity severity, Event event = Event::General);
+ stopwatch(const std::string &name, Event event = Event::General);
+ stopwatch(const std::string &name, EventSeverity severity, Event event = Event::General);
+ void report(const std::string &name);
+ ~stopwatch();
+
+private:
+ const std::string name;
+ EventSeverity severity = EventSeverity::Debug;
+ Event event = Event::General;
+ uint64_t start;
+};
+#else
+class stopwatch {
+ inline stopwatch(Event event = Event::General);
+ inline stopwatch(EventSeverity severity, Event event = Event::General);
+ inline stopwatch(const std::string &name, Event event = Event::General);
+ inline stopwatch(const std::string &name, EventSeverity severity, Event event = Event::General);
+ inline void report(const std::string &name) {}
+ inline ~stopwatch() {}
+};
+#endif
+}
+}
+
+#endif
diff --git a/include/mbgl/util/timer.hpp b/include/mbgl/util/timer.hpp
deleted file mode 100644
index 8171c2f5d1..0000000000
--- a/include/mbgl/util/timer.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef MBGL_UTIL_TIMER
-#define MBGL_UTIL_TIMER
-
-#include <mbgl/platform/event.hpp>
-
-#include <string>
-
-namespace mbgl {
-namespace util {
-
-#ifndef DISABLE_TIMER
-class timer {
-public:
- timer(Event event = Event::General);
- timer(EventSeverity severity, Event event = Event::General);
- timer(const std::string &name, Event event = Event::General);
- timer(const std::string &name, EventSeverity severity, Event event = Event::General);
- void report(const std::string &name);
- ~timer();
-
-private:
- const std::string name;
- EventSeverity severity = EventSeverity::Debug;
- Event event = Event::General;
- uint64_t start;
-};
-#else
-class timer {
- inline timer(Event event = Event::General);
- inline timer(EventSeverity severity, Event event = Event::General);
- inline timer(const std::string &name, Event event = Event::General);
- inline timer(const std::string &name, EventSeverity severity, Event event = Event::General);
- inline void report(const std::string &name) {}
- inline ~timer() {}
-};
-#endif
-}
-}
-
-#endif