mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 02:30:15 +00:00
45 lines
592 B
C++
45 lines
592 B
C++
|
#ifndef __TRACYSYSPOWER_HPP__
|
||
|
#define __TRACYSYSPOWER_HPP__
|
||
|
|
||
|
#if defined __linux__
|
||
|
# define TRACY_HAS_SYSPOWER
|
||
|
#endif
|
||
|
|
||
|
#ifdef TRACY_HAS_SYSPOWER
|
||
|
|
||
|
#include <stdint.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
#include "TracyFastVector.hpp"
|
||
|
|
||
|
namespace tracy
|
||
|
{
|
||
|
|
||
|
class SysPower
|
||
|
{
|
||
|
struct Domain
|
||
|
{
|
||
|
uint64_t value;
|
||
|
uint64_t overflow;
|
||
|
FILE* handle;
|
||
|
const char* name;
|
||
|
};
|
||
|
|
||
|
public:
|
||
|
SysPower();
|
||
|
~SysPower();
|
||
|
|
||
|
void Tick();
|
||
|
|
||
|
private:
|
||
|
void ScanDirectory( const char* path, int parent );
|
||
|
|
||
|
FastVector<Domain> m_domains;
|
||
|
uint64_t m_lastTime;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif
|