mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-22 11:36:21 +00:00
Introduce MG_ENABLE_CUSTOM_MILLIS
This commit is contained in:
1 parent
417533e90c
commit
0ed64707f3
5 files changed
+16
-1
No files matched your search
@@ -57,6 +57,10 @@
|
||||
#define MG_ENABLE_CUSTOM_RANDOM 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_CUSTOM_MILLIS
|
||||
#define MG_ENABLE_CUSTOM_MILLIS 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_PACKED_FS
|
||||
#define MG_ENABLE_PACKED_FS 0
|
||||
#endif
|
||||
|
||||
@@ -78,6 +78,8 @@ int mg_check_ip_acl(struct mg_str acl, uint32_t remote_ip) {
|
||||
return allowed == '+';
|
||||
}
|
||||
|
||||
#if MG_ENABLE_CUSTOM_MILLIS
|
||||
#else
|
||||
int64_t mg_millis(void) {
|
||||
#if MG_ARCH == MG_ARCH_WIN32
|
||||
return GetTickCount();
|
||||
@@ -112,3 +114,4 @@ int64_t mg_millis(void) {
|
||||
return time(NULL) * 1000;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user