freebsd-ports/sysutils/clockspeed/files/tryclock_gettime.c
Mario Sergio Fujikawa Ferreira a5fcdc400d o Remove ONLY_FOR_ARCHS limitation by adding timing support other
than RDTSC registers from Pentium. After a reminder by Garrett
  Wollman <wollman@FreeBSD.org> [1] that FreeBSD has a gethrtime()
  similar function, added experimental support for FreeBSD
  clock_gettime(2) which should work in all FreeBSD supported ARCHes

o Add notes in both DESCR and PKGMESSAGE that there might be precision
  differences since this is experimental code

Reviewed by:	portmgr (silence/no objections)
Submitted by:	wollman [1]
2003-01-02 05:46:09 +00:00

8 lines
102 B
C

#include <sys/time.h>
main()
{
struct timespec ts;
(void) clock_gettime(CLOCK_REALTIME, &ts);
}