Browse Source

Added support for sysconf(_SC_MONOTONIC_CLOCK).

Peter Kjellerstedt 17 years ago
parent
commit
45223588d1
1 changed files with 7 additions and 0 deletions
  1. 7 0
      libc/unistd/sysconf.c

+ 7 - 0
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)