This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

machine/time.h patch



I suspect this one my be more generally applicable but for now...

2000-12-01      Joel Sherrill <joel@OARcorp.com>

        * libc/include/machine/time.h: RTEMS systems can configure clock
tick
        rate so use sysconf() to ask.

Index: libc/include/machine/time.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/machine/time.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 time.h
--- time.h	2000/02/17 19:39:46	1.1.1.1
+++ time.h	2000/12/01 14:36:24
@@ -1,10 +1,13 @@
 #ifndef	_MACHTIME_H_
 #define	_MACHTIME_H_
 
+#if defined(__rtems__)
+#define _CLOCKS_PER_SEC_  sysconf(_SC_CLK_TCK)
+#else
 #if defined(__arm__) || defined(__thumb__)
 #define _CLOCKS_PER_SEC_ 100
 #endif
+#endif
 
 #endif	/* _MACHTIME_H_ */
-

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]