summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2016-07-14 15:55:17 +0200
committerantirez <antirez@gmail.com>2016-07-14 15:55:17 +0200
commitfc92c667f7181a287fa97a028de16bdd037318b6 (patch)
treea55d885d9c2af650731be5bd7ce069a94612a61a /utils
parentf50dc38bc29373b0f74db043cdb200995a324cf3 (diff)
downloadredis-fc92c667f7181a287fa97a028de16bdd037318b6.tar.gz
LRU simulator: fix new entry creation decr time.
Diffstat (limited to 'utils')
-rw-r--r--utils/lru/lfu-simulation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/lru/lfu-simulation.c b/utils/lru/lfu-simulation.c
index fe7a38354..2305fb3a2 100644
--- a/utils/lru/lfu-simulation.c
+++ b/utils/lru/lfu-simulation.c
@@ -137,7 +137,7 @@ int main(void) {
if (new_entry_time <= now) {
idx = 10+(rand()%10);
entries[idx].counter = COUNTER_INIT_VAL;
- entries[idx].decrtime = to_16bit_minutes(start);
+ entries[idx].decrtime = to_16bit_minutes(time(NULL));
entries[idx].hits = 0;
entries[idx].ctime = time(NULL);
new_entry_time = now+10;