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

Function rdbLoadTime

src/rdb.cpp:126–130  ·  view source on GitHub ↗

This is only used to load old databases stored with the RDB_OPCODE_EXPIRETIME * opcode. New versions of Redis store using the RDB_OPCODE_EXPIRETIME_MS * opcode. On error -1 is returned, however this could be a valid time, so * to check for loading errors the caller should call rioGetReadError() after * calling this function. */

Source from the content-addressed store, hash-verified

124 * to check for loading errors the caller should call rioGetReadError() after
125 * calling this function. */
126time_t rdbLoadTime(rio *rdb) {
127 int32_t t32;
128 if (rioRead(rdb,&t32,4) == 0) return -1;
129 return (time_t)t32;
130}
131
132int rdbSaveMillisecondTime(rio *rdb, long long t) {
133 int64_t t64 = (int64_t) t;

Callers 2

rdbLoadRioFunction · 0.85
redis_check_rdbFunction · 0.85

Calls 1

rioReadFunction · 0.85

Tested by

no test coverage detected