File: check_clock_gettime.c

package info (click to toggle)
libminc 2.4.07-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,288 kB
  • sloc: ansic: 57,268; cpp: 3,654; sh: 100; makefile: 23; ruby: 18
file content (15 lines) | stat: -rw-r--r-- 330 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#  if defined(__APPLE__)
#    include <AvailabilityMacros.h>
#    if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
#      error "clock_gettime not available on macOS < 10.12"
#    endif
#  endif

#include <time.h>
#include <stdio.h>

int main(int argc, char **argv)
{
  struct timespec ts;
  return clock_gettime(CLOCK_REALTIME, &ts);
}