Skip to content
Browse files

Add an implementation of mstime() to 2.4.

Commit 9419eb0 back ported a better expired keys collection algorithm
that is more incremental but for it to compile and work we need an
implementation of the mstime() function that was missing in 2.4.
  • Loading branch information...
1 parent 47d8dab commit cd2f985a5e565b0c1ddda072a8badce6c8e41f26 @antirez committed May 12, 2012
Showing with 6 additions and 0 deletions.
  1. +5 −0 src/util.c
  2. +1 −0 src/util.h
5 src/util.c
@@ -339,6 +339,11 @@ long long ustime(void) {
return ust;
+/* Return the UNIX time in milliseconds */
+long long mstime(void) {
+ return ustime()/1000;
#include <assert.h>
1 src/util.h
@@ -9,5 +9,6 @@ int string2ll(char *s, size_t slen, long long *value);
int string2l(char *s, size_t slen, long *value);
int d2string(char *buf, size_t len, double value);
long long ustime(void);
+long long mstime(void);

0 comments on commit cd2f985

Please sign in to comment.
Something went wrong with that request. Please try again.