mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 07:11:36 +00:00
Log duration of writing save game file
This commit is contained in:
parent
bd8c75daee
commit
b43eb29465
1 changed files with 7 additions and 0 deletions
|
@ -188,6 +188,8 @@ void MWState::StateManager::saveGame (const std::string& description, const Slot
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
const auto start = std::chrono::steady_clock::now();
|
||||||
|
|
||||||
if (!character)
|
if (!character)
|
||||||
{
|
{
|
||||||
MWWorld::ConstPtr player = MWMechanics::getPlayer();
|
MWWorld::ConstPtr player = MWMechanics::getPlayer();
|
||||||
|
@ -302,6 +304,11 @@ void MWState::StateManager::saveGame (const std::string& description, const Slot
|
||||||
|
|
||||||
Settings::Manager::setString ("character", "Saves",
|
Settings::Manager::setString ("character", "Saves",
|
||||||
slot->mPath.parent_path().filename().string());
|
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)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue