Commit a54584b7 authored by Evelyn's avatar Evelyn Committed by GitHub

Update mg_set_timer.md

parent 51907e26
...@@ -6,12 +6,12 @@ signature: | ...@@ -6,12 +6,12 @@ signature: |
double mg_set_timer(struct mg_connection *c, double timestamp); double mg_set_timer(struct mg_connection *c, double timestamp);
--- ---
Schedule MG_EV_TIMER event to be delivered at `timestamp` time. Schedules an MG_EV_TIMER event to be delivered at `timestamp` time.
`timestamp` is a UNIX time (a number of seconds since Epoch). It is `timestamp` is UNIX time (the number of seconds since Epoch). It is
`double` instead of `time_t` to allow for sub-second precision. `double` instead of `time_t` to allow for sub-second precision.
Return the old timer value. Returns the old timer value.
Example: set connect timeout to 1.5 seconds: Example: set the connect timeout to 1.5 seconds:
``` ```
c = mg_connect(&mgr, "cesanta.com", ev_handler); c = mg_connect(&mgr, "cesanta.com", ev_handler);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment