Files
Vladislav Sytchenko 60cf342ae0 SWDEV-301289 - Treewide macro rename
ATI_OS_WIN -> _WIN32
ATI_OS_LINUX -> __linux__

We should not rely on non-standard macros for platform detections.

Change-Id: If1d06e2e1187268df62a59609ea5496ab7eb709d


[ROCm/clr commit: c4aa6febe5]
2021-09-26 12:13:37 -04:00

47 righe
1.4 KiB
C++

/* Copyright (c) 2010 - 2021 Advanced Micro Devices, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. */
#ifndef _TIMER_H_
#define _TIMER_H_
#ifdef _WIN32
typedef __int64 i64;
#endif
#ifdef __linux__
typedef long long i64;
#endif
class CPerfCounter {
public:
CPerfCounter();
~CPerfCounter();
void Start(void);
void Stop(void);
void Reset(void);
double GetElapsedTime(void);
private:
i64 _freq;
i64 _clocks;
i64 _start;
};
#endif // _TIMER_H_