]> git.saurik.com Git - redis.git/commit
activeExpireCycle(): better precision in max time used.
authorantirez <antirez@gmail.com>
Mon, 14 May 2012 14:04:41 +0000 (16:04 +0200)
committerantirez <antirez@gmail.com>
Mon, 14 May 2012 14:04:41 +0000 (16:04 +0200)
commitb3624f5a160c2a3372ef1a0ab1858a804b7cbfc0
tree42168a156a16d56b543b208f2f2e4bd5aca0dc21
parent61daf8914d6c69c65fe37fa2d3914f266b71ea71
activeExpireCycle(): better precision in max time used.

activeExpireCycle() can consume no more than a few milliseconds per
iteration. This commit improves the precision of the check for the time
elapsed in two ways:

1) We check every 16 iterations instead of the main loop instead of 256.
2) We reset iterations at the start of the function and not every time
   we switch to the next database, so the check is correctly performed
   every 16 iterations.
src/redis.c