diff --git a/src/redis.c b/src/redis.c index fcc3be18..7ccd823a 100644 --- a/src/redis.c +++ b/src/redis.c @@ -288,6 +288,11 @@ long long ustime(void) { return ust; } +/* Return the UNIX time in milliseconds */ +long long mstime(void) { + return ustime()/1000; +} + /*====================== Hash table type implementation ==================== */ /* This is an hash table type that uses the SDS dynamic strings libary as diff --git a/src/redis.h b/src/redis.h index 8cc2474f..53507c88 100644 --- a/src/redis.h +++ b/src/redis.h @@ -726,6 +726,7 @@ dictType hashDictType; /* Utils */ long long ustime(void); +long long mstime(void); /* networking.c -- Networking and Client related operations */ redisClient *createClient(int fd);