Clamp timer->remaining() to 0 if the timer has expired.

This commit is contained in:
Aaron Giles 2012-02-28 09:21:38 +00:00
parent 9465d7393d
commit edf5edb720

View File

@ -251,7 +251,10 @@ attotime emu_timer::elapsed() const
attotime emu_timer::remaining() 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;
} }