mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-14 03:08:15 +00:00
REVIEW COMMIT
Update every 10 seconds and display seconds in GameList to make it easier to test the timing changes. Will delete this commit before merging.
This commit is contained in:
parent
b7ebd68cdd
commit
f14ac36ac8
@ -79,7 +79,7 @@ void CPUManager::StartTimePlayedTimer()
|
||||
|
||||
while (m_state != State::PowerDown)
|
||||
{
|
||||
m_time_played_finish_sync.WaitFor(std::chrono::seconds(30));
|
||||
m_time_played_finish_sync.WaitFor(std::chrono::seconds(10));
|
||||
auto curr_time = timer.now();
|
||||
|
||||
const std::string game_id = SConfig::GetInstance().GetGameID();
|
||||
|
@ -222,10 +222,13 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
|
||||
const std::chrono::milliseconds total_time = m_time_played_manager.GetTimePlayed(game_id);
|
||||
const auto total_minutes = std::chrono::duration_cast<std::chrono::minutes>(total_time);
|
||||
const auto total_hours = std::chrono::duration_cast<std::chrono::hours>(total_time);
|
||||
const auto total_seconds = std::chrono::duration_cast<std::chrono::seconds>(total_time);
|
||||
|
||||
// i18n: A time displayed as hours and minutes
|
||||
QString formatted_time =
|
||||
tr("%1h %2m").arg(total_hours.count()).arg(total_minutes.count() % 60);
|
||||
QString formatted_time = tr("%1h %2m %3s")
|
||||
.arg(total_hours.count())
|
||||
.arg(total_minutes.count() % 60)
|
||||
.arg(total_seconds.count() % 60);
|
||||
return formatted_time;
|
||||
}
|
||||
if (role == SORT_ROLE)
|
||||
|
Loading…
Reference in New Issue
Block a user