summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/timer.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-09-15 02:04:11 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-09-15 02:04:11 +0200
commit51fb3e42f915c3b538c423cfb9e5dfae11778717 (patch)
tree053a64cd587d7cc1fb1fc426da5ab3a3cf4d6b9d /ftnoir_tracker_pt/timer.h
parent463737c1b50246c56a67c35c1116732006348593 (diff)
parentb948329c7ae6ab2ff546cba43cdc4aca9b743cfd (diff)
Merge branch 'master' of github.com:opentrack/opentrack
Conflicts: facetracknoir/tracker.cpp ftnoir_filter_accela/ftnoir_filter_accela.cpp ftnoir_filter_accela/ftnoir_filter_accela.h ftnoir_filter_base/ftnoir_filter_base.h ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
Diffstat (limited to 'ftnoir_tracker_pt/timer.h')
-rw-r--r--ftnoir_tracker_pt/timer.h86
1 files changed, 43 insertions, 43 deletions
diff --git a/ftnoir_tracker_pt/timer.h b/ftnoir_tracker_pt/timer.h
index 2aaf725a..1c2c3559 100644
--- a/ftnoir_tracker_pt/timer.h
+++ b/ftnoir_tracker_pt/timer.h
@@ -1,44 +1,44 @@
-/* Copyright (c) 2012 Patrick Ruoff
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- */
-
-#ifndef PT_TIMER_H
-#define PT_TIMER_H
-
-#ifdef WIN32 // Windows system specific
-#include <windows.h>
-#else // Unix based system specific
-#include <sys/time.h>
-#endif
-
-// ----------------------------------------------------------------------------
-// high resolution timer based on http://www.songho.ca/misc/timer/timer.html
-class Timer
-{
-public:
- Timer();
-
- void start();
- void stop();
- void restart() { start(); } // for Qt compatibility
- double elapsed(); // get elapsed time in ms
-
-protected:
- double startTime; // starting time in ms
- double endTime; // ending time in ms
- bool running;
-
-#ifdef WIN32
- LARGE_INTEGER frequency; // ticks per second
- LARGE_INTEGER startCount;
- LARGE_INTEGER endCount;
-#else
- timeval startCount;
- timeval endCount;
-#endif
-};
-
+/* Copyright (c) 2012 Patrick Ruoff
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ */
+
+#ifndef PT_TIMER_H
+#define PT_TIMER_H
+
+#ifdef WIN32 // Windows system specific
+#include <windows.h>
+#else // Unix based system specific
+#include <sys/time.h>
+#endif
+
+// ----------------------------------------------------------------------------
+// high resolution timer based on http://www.songho.ca/misc/timer/timer.html
+class Timer
+{
+public:
+ Timer();
+
+ void start();
+ void stop();
+ void restart() { start(); } // for Qt compatibility
+ double elapsed(); // get elapsed time in ms
+
+protected:
+ double startTime; // starting time in ms
+ double endTime; // ending time in ms
+ bool running;
+
+#ifdef WIN32
+ LARGE_INTEGER frequency; // ticks per second
+ LARGE_INTEGER startCount;
+ LARGE_INTEGER endCount;
+#else
+ timeval startCount;
+ timeval endCount;
+#endif
+};
+
#endif //PT_TIMER_H \ No newline at end of file