mirror of
https://github.com/cesanta/mongoose.git
synced 2025-06-08 01:42:52 +08:00
Update mg_set_timer.md
This commit is contained in:
parent
51907e2642
commit
a54584b716
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user