From db2d9549447cdb4bc0dd608d9bc2557571fd984d Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 4 Dec 2000 19:06:37 +0000 Subject: 2000-12-04 Joel Sherrill * libc/include/machine/time.h: RTEMS systems can configure clock tick rate so use sysconf() to ask. --- newlib/libc/include/machine/time.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'newlib/libc/include') diff --git a/newlib/libc/include/machine/time.h b/newlib/libc/include/machine/time.h index 13857bfde..0caf12655 100644 --- a/newlib/libc/include/machine/time.h +++ b/newlib/libc/include/machine/time.h @@ -1,9 +1,13 @@ #ifndef _MACHTIME_H_ #define _MACHTIME_H_ +#if defined(__rtems__) +#define _CLOCKS_PER_SEC_ sysconf(_SC_CLK_TCK) +#else /* !__rtems__ */ #if defined(__arm__) || defined(__thumb__) #define _CLOCKS_PER_SEC_ 100 #endif +#endif /* !__rtems__ */ #endif /* _MACHTIME_H_ */ -- cgit v1.2.3