From db2d9549447cdb4bc0dd608d9bc2557571fd984d Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 4 Dec 2000 19:06:37 +0000 Subject: [PATCH] 2000-12-04 Joel Sherrill * libc/include/machine/time.h: RTEMS systems can configure clock tick rate so use sysconf() to ask. --- newlib/ChangeLog | 5 +++++ newlib/libc/include/machine/time.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index eaa9a748b..049140ecf 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2000-12-04 Joel Sherrill + + * libc/include/machine/time.h: RTEMS systems can configure clock + tick rate so use sysconf() to ask. + 2000-12-04 Joel Sherrill * libc/include/sys/times.h: Add reference to POSIX standard. 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_ */ -- 2.43.5