blob: a0a18b974d2a07f7dee128adf3b7789a582e5bee (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/* See LICENSE file for copyright and license details. */
#include "libsimple.h"
int
libsimple_strtotimeval(struct timeval *restrict tv, const char *restrict s, char **restrict end) /* TODO test */
{
struct timespec ts;
int r = libsimple_strtotimespec(&ts, s, end);
if (r && errno != ERANGE)
return r;
if (libsimple_timespec2timeval(tv, &ts) && r)
errno = ERANGE;
return r;
}
|