mirror of
https://github.com/lammertb/libhttp.git
synced 2025-12-22 04:02:04 +03:00
Minor optimization in push/pull
This commit is contained in:
@@ -2935,10 +2935,9 @@ static int push(struct mg_context *ctx,
|
||||
typedef size_t len_t;
|
||||
#endif
|
||||
|
||||
if (timeout > 0) {
|
||||
memset(&start, 0, sizeof(start));
|
||||
memset(&now, 0, sizeof(now));
|
||||
|
||||
if (timeout > 0) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &start);
|
||||
}
|
||||
|
||||
@@ -3034,10 +3033,9 @@ pull(FILE *fp, struct mg_connection *conn, char *buf, int len, double timeout)
|
||||
typedef size_t len_t;
|
||||
#endif
|
||||
|
||||
if (timeout > 0) {
|
||||
memset(&start, 0, sizeof(start));
|
||||
memset(&now, 0, sizeof(now));
|
||||
|
||||
if (timeout > 0) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &start);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user