nx2: fix the Linux (GCC) build of the vi2 present stats
std::chrono::microseconds::rep is long on Linux and long long on Windows, so std::max over the long long stats and a converted duration did not compile with GCC. Return long long from the conversion.
This commit is contained in:
parent
c7fb540505
commit
50fa86bbbc
1 changed files with 4 additions and 1 deletions
|
|
@ -836,7 +836,10 @@ private:
|
|||
// game is blocked here while Eden's GPU thread catches up (fence) and composites.
|
||||
{
|
||||
using us = std::chrono::microseconds;
|
||||
const auto to_us = [](auto d) { return std::chrono::duration_cast<us>(d).count(); };
|
||||
// long long like the stats: microseconds::rep is long on Linux (std::max needs one type).
|
||||
const auto to_us = [](auto d) -> long long {
|
||||
return std::chrono::duration_cast<us>(d).count();
|
||||
};
|
||||
m_stats.fence_us += to_us(waited - entered);
|
||||
m_stats.composite_us += to_us(composited - waited);
|
||||
m_stats.pace_us += to_us(paced - composited);
|
||||
|
|
|
|||
Loading…
Reference in a new issue