mirror of
https://github.com/fluencelabs/redis
synced 2025-05-25 16:31:19 +00:00
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:
parent
47d8dab2b1
commit
cd2f985a5e
@ -339,6 +339,11 @@ long long ustime(void) {
|
||||
return ust;
|
||||
}
|
||||
|
||||
/* Return the UNIX time in milliseconds */
|
||||
long long mstime(void) {
|
||||
return ustime()/1000;
|
||||
}
|
||||
|
||||
#ifdef UTIL_TEST_MAIN
|
||||
#include <assert.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);
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user