pollymc/logic/profiler/BaseProfiler.cpp

35 lines
575 B
C++
Raw Normal View History

#include "BaseProfiler.h"
2014-02-15 22:45:41 +05:30
#include <QProcess>
#ifdef Q_OS_WIN
#include <windows.h>
#endif
2014-02-15 22:45:41 +05:30
BaseProfiler::BaseProfiler(BaseInstance *instance, QObject *parent)
: QObject(parent), m_instance(instance)
{
}
BaseProfiler::~BaseProfiler()
{
}
void BaseProfiler::beginProfiling(MinecraftProcess *process)
{
beginProfilingImpl(process);
}
2014-02-15 22:45:41 +05:30
qint64 BaseProfiler::pid(QProcess *process)
{
#ifdef Q_OS_WIN
struct _PROCESS_INFORMATION *procinfo = process->pid();
return procinfo->dwProcessId;
2014-02-15 22:45:41 +05:30
#else
return process->pid();
2014-02-15 22:45:41 +05:30
#endif
}
BaseProfilerFactory::~BaseProfilerFactory()
{
}