Files
UnrealEngineUWP/Engine/Source/Developer/Windows/LiveCodingServer/Private/External/LC_Telemetry.h
Jack Porter 9d2ebe90d2 Merging //UE4/Dev-Main to Dev-Mobile (//UE4/Dev-Mobile)
#rb None
#jira 0

[CL 5396125 by Jack Porter in Dev-Mobile branch]
2019-03-14 00:59:16 -04:00

48 lines
827 B
C++

// Copyright 2011-2019 Molecular Matters GmbH, all rights reserved.
#pragma once
#include "CoreTypes.h"
#include <chrono>
namespace telemetry
{
// scoped timing information
class Scope
{
public:
explicit Scope(const char* name);
~Scope(void);
double ReadSeconds(void) const;
double ReadMilliSeconds(void) const;
double ReadMicroSeconds(void) const;
void Restart(void);
void End(void);
private:
const char* m_name;
std::chrono::high_resolution_clock::time_point m_start;
};
class Accumulator
{
public:
explicit Accumulator(const char* name);
void Accumulate(uint64_t value);
void ResetCurrent(void);
uint64_t ReadCurrent(void) const;
uint64_t ReadAccumulated(void) const;
void Print(void);
private:
const char* m_name;
uint64_t m_current;
uint64_t m_accumulated;
};
}