summaryrefslogtreecommitdiffstats
path: root/include/util/timer.h
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2023-08-24 17:00:31 -0400
committerDouglas Rumbaugh <dbr4@psu.edu>2023-08-24 17:00:31 -0400
commit076e104b8672924c3d80cd1da2fdb5ebee1766ac (patch)
treee33a8081c61899c5d1a471401605e55716ca3ff4 /include/util/timer.h
parent1cb522b36382381ef3f1494f24b0c6a98f8843a9 (diff)
downloaddynamic-extension-076e104b8672924c3d80cd1da2fdb5ebee1766ac.tar.gz
Migrated over to using psudb-common utilities/headers
Diffstat (limited to 'include/util/timer.h')
-rw-r--r--include/util/timer.h37
1 files changed, 0 insertions, 37 deletions
diff --git a/include/util/timer.h b/include/util/timer.h
deleted file mode 100644
index a9784a8..0000000
--- a/include/util/timer.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * include/util/timer.h
- *
- * Copyright (C) 2023 Douglas Rumbaugh <drumbaugh@psu.edu>
- *
- * All rights reserved. Published under the Modified BSD License.
- *
- */
-#pragma once
-
-#include <chrono>
-
-#ifdef ENABLE_TIMER
-#define TIMER_INIT() \
- auto timer_start = std::chrono::high_resolution_clock::now(); \
- auto timer_stop = std::chrono::high_resolution_clock::now();
-
-#define TIMER_START() \
- timer_start = std::chrono::high_resolution_clock::now()
-
-#define TIMER_STOP() \
- timer_stop = std::chrono::high_resolution_clock::now()
-
-#define TIMER_RESULT() \
- std::chrono::duration_cast<std::chrono::nanoseconds>(timer_stop - timer_start).count()
-
-#else
- #define TIMER_INIT() \
- do {} while(0)
- #define TIMER_START() \
- do {} while(0)
- #define TIMER_STOP() \
- do {} while(0)
- #define TIMER_RESULT() \
- 0l
-#endif
-