source: rtems/cpukit/score/src/ts64toticks.c @ 3d66dfc1

4.104.115
Last change on this file since 3d66dfc1 was 3d66dfc1, checked in by Joel Sherrill <joel.sherrill@…>, on 12/16/08 at 17:36:01

2008-12-16 Joel Sherrill <joel.sherrill@…>

  • libcsupport/src/times.c, posix/src/adjtime.c, posix/src/clockgetres.c, posix/src/sysconf.c, rtems/src/clockgettickspersecond.c, rtems/src/clockgettod.c, rtems/src/clockset.c, rtems/src/clocktodvalidate.c, score/src/timespecfromticks.c, score/src/timespectoticks.c, score/src/ts64toticks.c: More case converted to use configuration table entry not _TOD_Microseconds_per_tick.
  • Property mode set to 100644
File size: 811 bytes
Line 
1/**
2 *  @file  score/src/ts64toticks.c
3 */
4
5/*
6 *  COPYRIGHT (c) 1989-2008.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#if HAVE_CONFIG_H
17#include "config.h"
18#endif
19
20#include <sys/types.h>
21
22#include <rtems/system.h>
23#include <rtems/config.h>
24#include <rtems/score/timestamp.h>
25#include <rtems/score/tod.h>
26
27#if defined(CPU_RTEMS_SCORE_TIMESTAMP_IS_INT64) && \
28    !defined(CPU_RTEMS_SCORE_TIMESTAMP_INT64_INLINE)
29uint32_t _Timestamp64_To_ticks(
30  const Timestamp64_Control *time
31)
32{
33  uint32_t ticks;
34
35  ticks = *time / rtems_configuration_get_nanoseconds_per_tick();
36  if ( ticks )
37    return ticks;
38  return 1;
39}
40#endif
Note: See TracBrowser for help on using the repository browser.