]> git.saurik.com Git - redis.git/commitdiff
added mstime() to get UNIX time in milliseconds.
authorantirez <antirez@gmail.com>
Tue, 8 Nov 2011 23:03:03 +0000 (00:03 +0100)
committerantirez <antirez@gmail.com>
Tue, 8 Nov 2011 23:03:03 +0000 (00:03 +0100)
src/redis.c
src/redis.h

index fcc3be182021f8deab66f05b41a767d1702f6485..7ccd823ac812f20e0567dbde907055a18344bdce 100644 (file)
@@ -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
index 8cc2474f4ce4faf8fe39a13fd7e4e270e006fc71..53507c8897d1b5c2ab1faacda16be3a6fcfab105 100644 (file)
@@ -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);