summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Tracker_PT/timer.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-01-11 15:40:31 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-01-11 15:40:31 +0100
commit786fbaef73c522b6d138145b612034913ff70d03 (patch)
tree72906d050cde200d1259bec36f8ab2b91dd03404 /FTNoIR_Tracker_PT/timer.h
parent7105bfbc86840282569e860d7250799dcc140e32 (diff)
replace hand-rolled timer class with QElapsedTimer
Diffstat (limited to 'FTNoIR_Tracker_PT/timer.h')
-rw-r--r--FTNoIR_Tracker_PT/timer.h44
1 files changed, 0 insertions, 44 deletions
diff --git a/FTNoIR_Tracker_PT/timer.h b/FTNoIR_Tracker_PT/timer.h
deleted file mode 100644
index f189e23c..00000000
--- a/FTNoIR_Tracker_PT/timer.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* 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