Introduce MG_ENABLE_CUSTOM_MILLIS

This commit is contained in:
Sergey Lyubka committed 2022-04-04 18:14:59 +01:00
1 parent 417533e90c
commit 0ed64707f3
5 files changed
+16 -1

No files matched your search

+3
View File
@@ -4766,6 +4766,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();
@@ -4800,6 +4802,7 @@ int64_t mg_millis(void) {
return time(NULL) * 1000;
#endif
}
#endif
#ifdef MG_ENABLE_LINES
#line 1 "src/ws.c"