mirror of
https://github.com/holub/mame
synced 2025-05-23 14:19:01 +03:00
Clamp timer->remaining() to 0 if the timer has expired.
This commit is contained in:
parent
9465d7393d
commit
edf5edb720
@ -251,7 +251,10 @@ attotime emu_timer::elapsed() const
|
||||
|
||||
attotime emu_timer::remaining() const
|
||||
{
|
||||
return m_expire - machine().time();
|
||||
attotime curtime = machine().time();
|
||||
if (curtime >= m_expire)
|
||||
return attotime::zero;
|
||||
return m_expire - curtime;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user