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.
This commit is contained in:
antirez 2012-05-12 09:40:38 +02:00
parent 47d8dab2b1
commit cd2f985a5e
2 changed files with 6 additions and 0 deletions

View File

@ -339,6 +339,11 @@ long long ustime(void) {
return ust; return ust;
} }
/* Return the UNIX time in milliseconds */
long long mstime(void) {
return ustime()/1000;
}
#ifdef UTIL_TEST_MAIN #ifdef UTIL_TEST_MAIN
#include <assert.h> #include <assert.h>

View File

@ -9,5 +9,6 @@ int string2ll(char *s, size_t slen, long long *value);
int string2l(char *s, size_t slen, long *value); int string2l(char *s, size_t slen, long *value);
int d2string(char *buf, size_t len, double value); int d2string(char *buf, size_t len, double value);
long long ustime(void); long long ustime(void);
long long mstime(void);
#endif #endif