mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 22:56:30 -10:00
The new design is centered around the Event Trace JSON format but it should still be possible to adapt it for other profiling tools. The old profiling system has been removed.
32 lines
448 B
C++
32 lines
448 B
C++
#pragma once
|
|
|
|
#include "globalincs/pstypes.h"
|
|
#include "tracing/tracing.h"
|
|
|
|
#include "tracing/ThreadedEventProcessor.h"
|
|
|
|
#include <fstream>
|
|
|
|
|
|
/** @file
|
|
* @ingroup tracing
|
|
*/
|
|
|
|
namespace tracing
|
|
{
|
|
class MainFrameTimer
|
|
{
|
|
std::ofstream _out;
|
|
|
|
std::uint64_t _begin_time = 0;
|
|
public:
|
|
MainFrameTimer();
|
|
~MainFrameTimer();
|
|
|
|
void processEvent(const trace_event* event);
|
|
};
|
|
|
|
typedef ThreadedEventProcessor<MainFrameTimer> ThreadedMainFrameTimer;
|
|
}
|
|
|