From 45223588d17a4774e5c34fdd4d9a0c60f49242ee Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Fri, 22 Sep 2006 16:54:49 +0000 Subject: Added support for sysconf(_SC_MONOTONIC_CLOCK). --- libc/unistd/sysconf.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libc') diff --git a/libc/unistd/sysconf.c b/libc/unistd/sysconf.c index 0dde75102..f595b4173 100644 --- a/libc/unistd/sysconf.c +++ b/libc/unistd/sysconf.c @@ -883,6 +883,13 @@ long int sysconf(int name) #else RETURN_NEG_1; #endif + + case _SC_MONOTONIC_CLOCK: + /* Check using the clock_getres system call. */ + if (clock_getres(CLOCK_MONOTONIC, NULL) >= 0) + return _POSIX_VERSION; + + RETURN_NEG_1; } } libc_hidden_def(sysconf) -- cgit v1.2.3