Replaced boost::timer with std::chrono
parent
ae99f99b99
commit
cc0fce8568
|
@ -46,7 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <boost/tuple/tuple.hpp>
|
|
||||||
|
|
||||||
#include "FBXImporter.h"
|
#include "FBXImporter.h"
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef INCLUDED_PROFILER_H
|
#ifndef INCLUDED_PROFILER_H
|
||||||
#define INCLUDED_PROFILER_H
|
#define INCLUDED_PROFILER_H
|
||||||
|
|
||||||
#include "boost/timer.hpp"
|
#include <chrono>
|
||||||
#include "../include/assimp/DefaultLogger.hpp"
|
#include "../include/assimp/DefaultLogger.hpp"
|
||||||
#include "TinyFormatter.h"
|
#include "TinyFormatter.h"
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ public:
|
||||||
|
|
||||||
/** Start a named timer */
|
/** Start a named timer */
|
||||||
void BeginRegion(const std::string& region) {
|
void BeginRegion(const std::string& region) {
|
||||||
regions[region] = boost::timer();
|
regions[region] = std::chrono::system_clock::now();
|
||||||
DefaultLogger::get()->debug((format("START `"),region,"`"));
|
DefaultLogger::get()->debug((format("START `"),region,"`"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,12 +83,13 @@ public:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultLogger::get()->debug((format("END `"),region,"`, dt= ",(*it).second.elapsed()," s"));
|
std::chrono::duration<double> elapsedSeconds = std::chrono::system_clock::now() - regions[region];
|
||||||
|
DefaultLogger::get()->debug((format("END `"),region,"`, dt= ", elapsedSeconds.count()," s"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
typedef std::map<std::string,boost::timer> RegionMap;
|
typedef std::map<std::string,std::chrono::time_point<std::chrono::system_clock>> RegionMap;
|
||||||
RegionMap regions;
|
RegionMap regions;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "assimp_view.h"
|
#include "assimp_view.h"
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
using namespace AssimpView;
|
using namespace AssimpView;
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ AnimEvaluator::AnimEvaluator( const aiAnimation* pAnim)
|
||||||
{
|
{
|
||||||
mAnim = pAnim;
|
mAnim = pAnim;
|
||||||
mLastTime = 0.0;
|
mLastTime = 0.0;
|
||||||
mLastPositions.resize( pAnim->mNumChannels, boost::make_tuple( 0, 0, 0));
|
mLastPositions.resize( pAnim->mNumChannels, std::make_tuple( 0, 0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define AV_ANIMEVALUATOR_H_INCLUDED
|
#define AV_ANIMEVALUATOR_H_INCLUDED
|
||||||
|
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace AssimpView
|
namespace AssimpView
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue