mc146818a: be less clever in computing next period timeout
commit2d01479c13a71fabaa6a2ffefe4a1d8713ef63ad
authorAnthony Liguori <aliguori@us.ibm.com>
Tue, 9 Nov 2010 22:57:49 +0000 (9 16:57 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 9 Nov 2010 22:57:49 +0000 (9 16:57 -0600)
tree460855240baacfa8929a6f714f7702f79182f2cc
parentcd8f2841cdd854b9f96b662c7416cad79f23f8ac
mc146818a: be less clever in computing next period timeout

Most likely through evolution, the code programs the next period based on the
last period which effectively gives it a default behavior of
DRIFT_REINJECT_FAST.  That said, this behavior is subtle and the code reads like
it actually implements DRIFT_DROP because current_time doesn't always refer to
the current time.

Refactor to make this more obvious and subsequently simplify in the process.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc/mc146818a.cpp