1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

Log duration of writing save game file

This commit is contained in:
elsid 2022-02-13 20:13:14 +01:00
parent bd8c75daee
commit b43eb29465
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

@ -188,6 +188,8 @@ void MWState::StateManager::saveGame (const std::string& description, const Slot
try
{
const auto start = std::chrono::steady_clock::now();
if (!character)
{
MWWorld::ConstPtr player = MWMechanics::getPlayer();
@ -302,6 +304,11 @@ void MWState::StateManager::saveGame (const std::string& description, const Slot
Settings::Manager::setString ("character", "Saves",
slot->mPath.parent_path().filename().string());
const auto finish = std::chrono::steady_clock::now();
Log(Debug::Info) << '\'' << description << "' is saved in "
<< std::chrono::duration_cast<std::chrono::duration<float, std::milli>>(finish - start).count() << "ms";
}
catch (const std::exception& e)
{