MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rdbLoadTime

Function rdbLoadTime

app/redis-6.2.6/src/rdb.c:121–125  ·  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

119 * to check for loading errors the caller should call rioGetReadError() after
120 * calling this function. */
121time_t rdbLoadTime(rio *rdb) {
122 int32_t t32;
123 if (rioRead(rdb,&t32,4) == 0) return -1;
124 return (time_t)t32;
125}
126
127int rdbSaveMillisecondTime(rio *rdb, long long t) {
128 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