diff --git a/AI/Nullkiller/AIUtility.cpp b/AI/Nullkiller/AIUtility.cpp index 66108344b..09000cb94 100644 --- a/AI/Nullkiller/AIUtility.cpp +++ b/AI/Nullkiller/AIUtility.cpp @@ -378,11 +378,11 @@ bool isWeeklyRevisitable(const CGObjectInstance * obj) return false; } -uint64_t timeElapsed(boost::chrono::time_point start) +uint64_t timeElapsed(std::chrono::time_point start) { - auto end = boost::chrono::high_resolution_clock::now(); + auto end = std::chrono::high_resolution_clock::now(); - return boost::chrono::duration_cast(end - start).count(); + return std::chrono::duration_cast(end - start).count(); } // todo: move to obj manager @@ -492,4 +492,4 @@ bool shouldVisit(const Nullkiller * ai, const CGHeroInstance * h, const CGObject return false; return true; -} \ No newline at end of file +} diff --git a/AI/Nullkiller/AIUtility.h b/AI/Nullkiller/AIUtility.h index dd1b7c1a8..dd591134f 100644 --- a/AI/Nullkiller/AIUtility.h +++ b/AI/Nullkiller/AIUtility.h @@ -49,6 +49,8 @@ #include "../../lib/mapObjects/CGHeroInstance.h" #include "../../lib/CPathfinder.h" +#include + using namespace tbb; class CCallback; @@ -216,7 +218,7 @@ bool compareHeroStrength(HeroPtr h1, HeroPtr h2); bool compareArmyStrength(const CArmedInstance * a1, const CArmedInstance * a2); bool compareArtifacts(const CArtifactInstance * a1, const CArtifactInstance * a2); -uint64_t timeElapsed(boost::chrono::time_point start); +uint64_t timeElapsed(std::chrono::time_point start); // todo: move to obj manager bool shouldVisit(const Nullkiller * ai, const CGHeroInstance * h, const CGObjectInstance * obj); diff --git a/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp b/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp index cb15b1914..ded809623 100644 --- a/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp +++ b/AI/Nullkiller/Analyzers/DangerHitMapAnalyzer.cpp @@ -19,7 +19,7 @@ void DangerHitMapAnalyzer::updateHitMap() logAi->trace("Update danger hitmap"); upToDate = true; - auto start = boost::chrono::high_resolution_clock::now(); + auto start = std::chrono::high_resolution_clock::now(); auto cb = ai->cb.get(); auto mapSize = ai->cb->getMapSize(); diff --git a/AI/Nullkiller/Analyzers/ObjectClusterizer.cpp b/AI/Nullkiller/Analyzers/ObjectClusterizer.cpp index 96f25e9c6..bc60f43ba 100644 --- a/AI/Nullkiller/Analyzers/ObjectClusterizer.cpp +++ b/AI/Nullkiller/Analyzers/ObjectClusterizer.cpp @@ -178,7 +178,7 @@ bool ObjectClusterizer::shouldVisitObject(const CGObjectInstance * obj) const void ObjectClusterizer::clusterize() { - auto start = boost::chrono::high_resolution_clock::now(); + auto start = std::chrono::high_resolution_clock::now(); nearObjects.reset(); farObjects.reset(); @@ -349,4 +349,4 @@ void ObjectClusterizer::clusterize() } logAi->trace("Clusterization complete in %ld", timeElapsed(start)); -} \ No newline at end of file +} diff --git a/AI/Nullkiller/Engine/Nullkiller.cpp b/AI/Nullkiller/Engine/Nullkiller.cpp index d3f9e81cc..2ef3cc580 100644 --- a/AI/Nullkiller/Engine/Nullkiller.cpp +++ b/AI/Nullkiller/Engine/Nullkiller.cpp @@ -73,7 +73,7 @@ Goals::TTask Nullkiller::choseBestTask(Goals::TSubgoal behavior, int decompositi { logAi->debug("Checking behavior %s", behavior->toString()); - auto start = boost::chrono::high_resolution_clock::now(); + auto start = std::chrono::high_resolution_clock::now(); Goals::TGoalVec elementarGoals = decomposer->decompose(behavior, decompositionMaxDepth); Goals::TTaskVec tasks; @@ -122,7 +122,7 @@ void Nullkiller::updateAiState(int pass) { boost::this_thread::interruption_point(); - auto start = boost::chrono::high_resolution_clock::now(); + auto start = std::chrono::high_resolution_clock::now(); activeHero = nullptr; @@ -293,4 +293,4 @@ TResources Nullkiller::getFreeResources() const void Nullkiller::lockResources(const TResources & res) { lockedResources += res; -} \ No newline at end of file +} diff --git a/AI/Nullkiller/Pathfinding/AIPathfinder.cpp b/AI/Nullkiller/Pathfinding/AIPathfinder.cpp index e37dda2bf..4b51369e1 100644 --- a/AI/Nullkiller/Pathfinding/AIPathfinder.cpp +++ b/AI/Nullkiller/Pathfinding/AIPathfinder.cpp @@ -49,7 +49,7 @@ void AIPathfinder::updatePaths(std::map heroes storage.reset(new AINodeStorage(ai, cb->getMapSize())); } - auto start = boost::chrono::high_resolution_clock::now(); + auto start = std::chrono::high_resolution_clock::now(); logAi->debug("Recalculate all paths"); int pass = 0;