summaryrefslogtreecommitdiff
path: root/src/ToolBox/superpmi/superpmi/cycletimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ToolBox/superpmi/superpmi/cycletimer.h')
-rw-r--r--src/ToolBox/superpmi/superpmi/cycletimer.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ToolBox/superpmi/superpmi/cycletimer.h b/src/ToolBox/superpmi/superpmi/cycletimer.h
new file mode 100644
index 0000000000..9ad855501a
--- /dev/null
+++ b/src/ToolBox/superpmi/superpmi/cycletimer.h
@@ -0,0 +1,28 @@
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+#ifndef _CycleTimer
+#define _CycleTimer
+
+#include "errorhandling.h"
+
+class CycleTimer
+{
+public:
+ CycleTimer();
+ ~CycleTimer();
+
+ void Start();
+ void Stop();
+ unsigned __int64 GetCycles();
+ unsigned __int64 QueryOverhead();
+
+private:
+ // Cycles
+ unsigned __int64 start;
+ unsigned __int64 stop;
+ unsigned __int64 overhead;
+};
+#endif