mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-04 15:19:09 +00:00
Timer: protect usages of ms timers from rollover
This commit is contained in:
parent
0fe99e9bc8
commit
fec61f89a3
4 changed files with 16 additions and 31 deletions
|
@ -159,7 +159,8 @@ void HiresTexture::Prefetch()
|
|||
const size_t max_mem =
|
||||
(sys_mem / 2 < recommended_min_mem) ? (sys_mem / 2) : (sys_mem - recommended_min_mem);
|
||||
|
||||
const u64 start_time = Common::Timer::NowMs();
|
||||
Common::Timer timer;
|
||||
timer.Start();
|
||||
for (const auto& entry : s_textureMap)
|
||||
{
|
||||
const std::string& base_filename = entry.first;
|
||||
|
@ -207,9 +208,8 @@ void HiresTexture::Prefetch()
|
|||
}
|
||||
}
|
||||
|
||||
const u64 stop_time = Common::Timer::NowMs();
|
||||
OSD::AddMessage(fmt::format("Custom Textures loaded, {:.1f} MB in {:.1f}s",
|
||||
size_sum / (1024.0 * 1024.0), (stop_time - start_time) / 1000.0),
|
||||
size_sum / (1024.0 * 1024.0), timer.ElapsedMs() / 1000.0),
|
||||
10000);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue