2018-07-24 14:59:03 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <assert.h>
|
|
|
|
|
2018-09-25 08:34:04 +00:00
|
|
|
#include "esp_transport_utils.h"
|
2018-07-24 14:59:03 +00:00
|
|
|
|
2018-09-26 09:56:47 +00:00
|
|
|
void esp_transport_utils_ms_to_timeval(int timeout_ms, struct timeval *tv)
|
2018-07-24 14:59:03 +00:00
|
|
|
{
|
|
|
|
tv->tv_sec = timeout_ms / 1000;
|
|
|
|
tv->tv_usec = (timeout_ms - (tv->tv_sec * 1000)) * 1000;
|
|
|
|
}
|