clogger RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
f58307e6ef91abbba7eb54ae08dd7a6c92e265f1 blob 641 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
/*
 * this header includes functions to support broken systems
 * without clock_gettime() or CLOCK_MONOTONIC
 */

#ifndef HAVE_CLOCK_GETTIME
#  ifndef CLOCK_REALTIME
#    define CLOCK_REALTIME 0 /* whatever */
#  endif
static int fake_clock_gettime(int clk_id, struct timespec *res)
{
	struct timeval tv;
	int r = gettimeofday(&tv, NULL);

	assert(0 == r && "gettimeofday() broke!?");
	res->tv_sec = tv.tv_sec;
	res->tv_nsec = tv.tv_usec * 1000;

	return r;
}
#  define clock_gettime fake_clock_gettime
#endif /* broken systems w/o clock_gettime() */

/* UGH */
#ifndef _POSIX_MONOTONIC_CLOCK
#  define CLOCK_MONOTONIC CLOCK_REALTIME
#endif
debug log:

solving f58307e ...
found f58307e in https://bogomips.org/clogger.git

clogger RubyGem user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/clogger-public
	git clone --mirror http://ou63pmih66umazou.onion/clogger-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.clogger
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.clogger

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox