mailing list of musl libc
 help / color / mirror / code / Atom feed
375ec0e34f471ce0feb008e3a74f8b89d123b0d9 blob 344 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 
#include <time.h>
#include <sys/time.h>
#include "syscall.h"

int __clock_gettime(clockid_t clk, struct timespec *ts);

int gettimeofday(struct timeval *restrict tv, void *restrict tz)
{
	struct timespec ts;
	if (!tv) return 0;
	__clock_gettime(CLOCK_REALTIME, &ts);
	tv->tv_sec = ts.tv_sec;
	tv->tv_usec = (int)ts.tv_nsec / 1000;
	return 0;
}
debug log:

solving 375ec0e ...
found 375ec0e in https://inbox.vuxu.org/musl/e055ebf55ff719cd25cb1446a642c8c032475223.1409524413.git.Jens.Gustedt@inria.fr/
found 691f8e9 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 691f8e9043b2c61bf8b49faf03cf902a81b1c964	src/time/gettimeofday.c

applying [1/1] https://inbox.vuxu.org/musl/e055ebf55ff719cd25cb1446a642c8c032475223.1409524413.git.Jens.Gustedt@inria.fr/
diff --git a/src/time/gettimeofday.c b/src/time/gettimeofday.c
index 691f8e9..375ec0e 100644

Checking patch src/time/gettimeofday.c...
Applied patch src/time/gettimeofday.c cleanly.

index at:
100644 375ec0e34f471ce0feb008e3a74f8b89d123b0d9	src/time/gettimeofday.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).