summaryrefslogtreecommitdiff
path: root/src/ToolBox/superpmi/superpmi/cycletimer.h
blob: a99d1c33dc495b973f6d6b50dd92d7b14aa22cbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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