Specify LRU resolution in milliseconds.

This commit is contained in:
antirez
2014-03-20 11:33:25 +01:00
parent 63aacbe86c
commit 8f0b74910a
4 changed files with 4 additions and 5 deletions

View File

@ -844,11 +844,10 @@ void activeExpireCycle(int type) {
}
void updateLRUClock(void) {
server.lruclock = (server.unixtime/REDIS_LRU_CLOCK_RESOLUTION) &
server.lruclock = (mstime()/REDIS_LRU_CLOCK_RESOLUTION) &
REDIS_LRU_CLOCK_MAX;
}
/* Add a sample to the operations per second array of samples. */
void trackOperationsPerSecond(void) {
long long t = mstime() - server.ops_sec_last_sample_time;