This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
machine/time.h patch
- To: newlib at sources dot redhat dot com
- Subject: machine/time.h patch
- From: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Date: Fri, 01 Dec 2000 08:28:24 -0600
- Organization: OAR Corporation
- Reply-To: joel dot sherrill at OARcorp dot com
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