MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / LFUGetTimeInMinutes

Function LFUGetTimeInMinutes

src/evict.cpp:293–295  ·  view source on GitHub ↗

Return the current time in minutes, just taking the least significant * 16 bits. The returned time is suitable to be stored as LDT (last decrement * time) for the LFU implementation. */

Source from the content-addressed store, hash-verified

291 * 16 bits. The returned time is suitable to be stored as LDT (last decrement
292 * time) for the LFU implementation. */
293unsigned long LFUGetTimeInMinutes(void) {
294 return (g_pserver->unixtime/60) & 65535;
295}
296
297/* Given an object last access time, compute the minimum number of minutes
298 * that elapsed since the last access. Handle overflow (ldt greater than

Callers 5

updateLFUFunction · 0.85
LFUTimeElapsedFunction · 0.85
createObjectFunction · 0.85
objectSetLRUOrLFUFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected