summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coretodmsecstoticks.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-16 20:53:34 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-16 20:53:34 +0000
commit26fb4aadcd2c3159ecca7493c1f3d02cc02149ba (patch)
treee352a00acf541d65590f7c250b9fd9cd61f4e70d /cpukit/score/src/coretodmsecstoticks.c
parent2008-12-16 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-26fb4aadcd2c3159ecca7493c1f3d02cc02149ba.tar.bz2
2008-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* libblock/src/bdbuf.c, libmisc/capture/capture-cli.c, libmisc/capture/capture.c, libmisc/mw-fb/mw_uid.c, rtems/include/rtems/rtems/support.h, score/Makefile.am, score/include/rtems/score/tod.h, score/src/coretod.c, score/src/coretodtickle.c: Eliminate all public use of TOD conversion routines. Eliminate _TOD_Microseconds_per_tick and let every place use the field directly from the Configuration Table. This required moving some methods from macros to bodies. * score/src/coretodmsecstoticks.c, score/src/coretodtickspersec.c, score/src/coretodusectoticks.c: New files.
Diffstat (limited to 'cpukit/score/src/coretodmsecstoticks.c')
-rw-r--r--cpukit/score/src/coretodmsecstoticks.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/cpukit/score/src/coretodmsecstoticks.c b/cpukit/score/src/coretodmsecstoticks.c
new file mode 100644
index 0000000000..cddd3d646d
--- /dev/null
+++ b/cpukit/score/src/coretodmsecstoticks.c
@@ -0,0 +1,25 @@
+/* COPYRIGHT (c) 1989-2008.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/config.h>
+#include <rtems/score/tod.h>
+
+uint32_t TOD_MILLISECONDS_TO_TICKS(
+ uint32_t milliseconds
+)
+{
+ return (milliseconds / rtems_configuration_get_milliseconds_per_tick());
+}