Commit fc92c667 authored by antirez's avatar antirez
Browse files

LRU simulator: fix new entry creation decr time.

parent f50dc38b
...@@ -137,7 +137,7 @@ int main(void) { ...@@ -137,7 +137,7 @@ int main(void) {
if (new_entry_time <= now) { if (new_entry_time <= now) {
idx = 10+(rand()%10); idx = 10+(rand()%10);
entries[idx].counter = COUNTER_INIT_VAL; 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].hits = 0;
entries[idx].ctime = time(NULL); entries[idx].ctime = time(NULL);
new_entry_time = now+10; new_entry_time = now+10;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment