antirez/redis — pull request #646 by jokea (2012-08-28 07:16:50+00:00)
Title: Fix for issue #633

When system time changes back, the timer will not worker properly hence some core functionality of redis will stop working(e.g. replication, bgsave, etc).

The patch saves the previous time and when a system clock skew is detected, it will force expire all timers, this fixes issue #633.

This patch also make the timer list in sorted order, so getting the nearest timer is O(1) now. (Although adding/deleting timers are still O(N)).