Fix bug timestamp view 'Once per Second' option (#5080)
Signed-off-by: Santi Paprika <santi.gonzalez.cs@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user