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

Function getLRUClock

src/evict.cpp:73–75  ·  view source on GitHub ↗

Return the LRU clock, based on the clock resolution. This is a time * in a reduced-bits format that can be used to set and check the * object->lru field of redisObject structures. */

Source from the content-addressed store, hash-verified

71 * in a reduced-bits format that can be used to set and check the
72 * object->lru field of redisObject structures. */
73unsigned int getLRUClock(void) {
74 return (mstime()/LRU_CLOCK_RESOLUTION) & LRU_CLOCK_MAX;
75}
76
77/* This function is used to obtain the current LRU clock.
78 * If the current resolution is lower than the frequency we refresh the

Callers 3

LRU_CLOCKFunction · 0.85
serverCronFunction · 0.85
initServerConfigFunction · 0.85

Calls 1

mstimeFunction · 0.70

Tested by

no test coverage detected