Fix Timer

This commit is contained in:
DanielSvoboda 2024-10-09 03:15:04 -03:00
parent 7ea4ac03a1
commit fd9c27bcfc

View File

@ -137,7 +137,10 @@ void Emulator::Run(const std::filesystem::path& file) {
// Timer for 'Play Time' // Timer for 'Play Time'
QTimer* timer = new QTimer(); QTimer* timer = new QTimer();
QObject::connect(timer, &QTimer::timeout, [this, id]() { UpdatePlayTime(id); }); QObject::connect(timer, &QTimer::timeout, [this, id]() {
UpdatePlayTime(id);
start_time = std::chrono::steady_clock::now();
});
timer->start(60000); // 60000 ms = 1 minute timer->start(60000); // 60000 ms = 1 minute
#endif #endif
title = param_sfo->GetString("TITLE").value_or("Unknown title"); title = param_sfo->GetString("TITLE").value_or("Unknown title");