Fix bug timestamp view 'Once per Second' option (#5080)

Signed-off-by: Santi Paprika <santi.gonzalez.cs@gmail.com>
This commit is contained in:
Santi Paprika
2021-11-01 14:47:45 +00:00
committed by GitHub
parent 8c0dbe4b33
commit db01d8ddda
2 changed files with 2 additions and 2 deletions
@@ -249,7 +249,7 @@ namespace AZ
// Controls how often the timestamp data is refreshed
RefreshType m_refreshType = RefreshType::Realtime;
AZStd::sys_time_t m_lastUpdateTimeMicroSecond;
AZStd::sys_time_t m_lastUpdateTimeMicroSecond = 0;
};
@@ -651,7 +651,7 @@ namespace AZ
if (m_refreshType == RefreshType::OncePerSecond)
{
auto now = AZStd::GetTimeNowMicroSecond();
if (m_lastUpdateTimeMicroSecond == 0 || now - m_lastUpdateTimeMicroSecond > 1000000)
if (now - m_lastUpdateTimeMicroSecond > 1000000)
{
needEnable = true;
m_lastUpdateTimeMicroSecond = now;