Use sub-second time for timers in MG

PUBLISHED_FROM=2b5bd1589465a5f43bc888c689842332cf7cdf98
This commit is contained in:
Deomid Ryabkov authored and Sergey Lyubka committed 2015-12-20 17:49:13 +00:00
1 parent f05733da69
commit 05082cec88
2 files changed
+44 -13

No files matched your search

+8 -1
View File
@@ -326,6 +326,13 @@ void cs_log_printf(const char *fmt, ...);
#endif
#endif /* _CS_DBG_H_ */
#ifndef _CS_TIME_H_
#define _CS_TIME_H_
/* Sub-second granularity time(). */
double cs_time();
#endif /* _CS_TIME_H_ */
/*
* Copyright (c) 2015 Cesanta Software Limited
* All rights reserved
@@ -1187,7 +1194,7 @@ void mg_if_recved(struct mg_connection *nc, size_t len);
void mg_if_poll(struct mg_connection *nc, time_t now);
/* Deliver a TIMER event to the connection. */
void mg_if_timer(struct mg_connection *c, time_t now);
void mg_if_timer(struct mg_connection *c, double now);
/* Perform interface-related connection initialization. Return 1 on success. */
int mg_if_create_conn(struct mg_connection *nc);