Use std::chrono instead of boost::chrono.

This commit is contained in:
Jean-Philip Desjardins 2016-07-17 16:10:58 -04:00
parent 33102cb2d3
commit 240bd08ddd
2 changed files with 6 additions and 6 deletions

View File

@ -34,12 +34,12 @@ void CProfiler::EnterZone(ZoneHandle zoneHandle)
{
assert(std::this_thread::get_id() == m_workThreadId);
auto thisTime = boost::chrono::high_resolution_clock::now();
auto thisTime = std::chrono::high_resolution_clock::now();
if(!m_zoneStack.empty())
{
auto topZoneHandle = m_zoneStack.top();
auto duration = boost::chrono::duration_cast<boost::chrono::microseconds>(thisTime - m_currentTime);
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(thisTime - m_currentTime);
AddTimeToZone(topZoneHandle, duration.count());
}
@ -53,11 +53,11 @@ void CProfiler::ExitZone()
assert(std::this_thread::get_id() == m_workThreadId);
assert(!m_zoneStack.empty());
auto thisTime = boost::chrono::high_resolution_clock::now();
auto thisTime = std::chrono::high_resolution_clock::now();
{
auto topZoneHandle = m_zoneStack.top();
auto duration = boost::chrono::duration_cast<boost::chrono::microseconds>(thisTime - m_currentTime);
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(thisTime - m_currentTime);
AddTimeToZone(topZoneHandle, duration.count());
}

View File

@ -4,7 +4,7 @@
#include <stack>
#include <thread>
#include <vector>
#include <boost/chrono.hpp>
#include <chrono>
#include "Singleton.h"
#include "Types.h"
@ -20,7 +20,7 @@ public:
};
typedef std::vector<ZONE> ZoneArray;
typedef boost::chrono::high_resolution_clock::time_point TimePoint;
typedef std::chrono::high_resolution_clock::time_point TimePoint;
CProfiler();
virtual ~CProfiler();