source: rtems/cpukit/score/src/coretodmsecstoticks.c @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 912 bytes
Line 
1/*  COPYRIGHT (c) 1989-2011.
2 *  On-Line Applications Research Corporation (OAR).
3 *
4 *  The license and distribution terms for this file may be
5 *  found in the file LICENSE in this distribution or at
6 *  http://www.rtems.com/license/LICENSE.
7 */
8
9
10#if HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <rtems/system.h>
15#include <rtems/config.h>
16#include <rtems/score/tod.h>
17
18uint32_t TOD_MILLISECONDS_TO_TICKS(
19  uint32_t milliseconds
20)
21{
22  uint32_t ticks;
23  uint32_t milliseconds_per_tick;
24
25  /**
26   *  We should ensure the ticks not be truncated by integer division.  We
27   *  need to have it be greater than or equal to the requested time.  It
28   *  should not be shorter.
29   */
30  milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick();
31  ticks                 = milliseconds / milliseconds_per_tick;
32  if ( (milliseconds % milliseconds_per_tick) != 0 )
33    ticks += 1;
34
35  return ticks;
36}
Note: See TracBrowser for help on using the repository browser.