Changeset 0b172df9 in rtems for c/src/ada


Ignore:
Timestamp:
Jul 10, 1997, 8:23:27 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
bb566a02
Parents:
bf3a7a5a
Message:

fixed milliseconds and microseconds to tick conversion routines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/ada/rtems.adb

    rbf3a7a5a r0b172df9  
    6767   end Milliseconds_To_Microseconds;
    6868
     69   function Microseconds_To_Ticks (
     70      Microseconds : RTEMS.Unsigned32
     71   ) return RTEMS.Interval is
     72      Microseconds_Per_Tick : RTEMS.Interval;
     73      pragma Import (C, Microseconds_Per_Tick, "_TOD_Microseconds_per_tick");
     74   begin
     75
     76      return Microseconds / Microseconds_Per_Tick;
     77
     78   end Microseconds_To_Ticks;
     79
    6980   function Milliseconds_To_Ticks (
    7081      Milliseconds : RTEMS.Unsigned32
    7182   ) return RTEMS.Interval is
    72       Ticks_Per_Second : RTEMS.Interval;
    73       pragma Import (C, Ticks_Per_Second, "_TOD_Ticks_per_second");
    74 
    75    begin
    76 
    77       return Milliseconds / Ticks_Per_Second;
     83   begin
     84
     85      return Microseconds_To_Ticks(Milliseconds_To_Microseconds(Milliseconds));
    7886
    7987   end Milliseconds_To_Ticks;
    80 
    81    function Microseconds_To_Ticks (
    82       Microseconds : RTEMS.Unsigned32
    83    ) return RTEMS.Interval is
    84    begin
    85 
    86       return Milliseconds_To_Ticks( Microseconds / 1000 );
    87 
    88    end Microseconds_To_Ticks;
    8988
    9089   function Build_Name (
Note: See TracChangeset for help on using the changeset viewer.