Changeset 789d0e8 in ada-examples


Ignore:
Timestamp:
Sep 17, 2009, 6:13:32 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
ada-examples-4-10-branch, master
Children:
964021d
Parents:
d4c4aba
Message:

2009-09-17 Joel Sherrill <joel.sherrill@…>

  • Makefile, delay_until.adb: Make follow standard RTEMS test output format. Add output screens where appropriate.
  • delay_until.scn: New file.
Location:
delay_until
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • delay_until/ChangeLog

    rd4c4aba r789d0e8  
     12009-09-17      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile, delay_until.adb: Make follow standard RTEMS test output
     4        format. Add output screens where appropriate.
     5        * delay_until.scn: New file.
     6
    172009-09-17      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • delay_until/Makefile

    rd4c4aba r789d0e8  
    33#
    44#  See README.Makefiles in the main ada-examples directory.
     5#
     6#  $Id$
    57#
    68
  • delay_until/delay_until.adb

    rd4c4aba r789d0e8  
     1--
     2--  $Id$
     3--
     4
    15with Ada.Real_Time;
    26with Ada.Text_Io;
     
    610
    711
    8 procedure Delay_Until_Test is
     12procedure Delay_Until is
    913   Next_Wakeup : Ada.Real_Time.Time;
    10    Period      : constant Ada.Real_Time.Time_Span := Ada.Real_Time.Nanoseconds (16666667);
    11 --   Period      : constant Ada.Real_Time.Time_Span := Ada.Real_Time.Nanoseconds      (20000);
     14   Period      : constant Ada.Real_Time.Time_Span :=
     15                    Ada.Real_Time.Nanoseconds (16666667);
     16                    --   Ada.Real_Time.Nanoseconds (20000);
    1217
    1318   Iterations : constant := 1000;
     
    1823
    1924begin
    20    Ada.Text_Io.Put_Line (Integer'Image (Iterations) & " iterations with " &
    21                          Duration'Image (Ada.Real_Time.To_Duration(Period)) & "s period");
     25   Ada.Text_Io.Put_Line ("*** Delay Until Variation Test ***");
     26   Ada.Text_Io.Put_Line (
     27      Integer'Image (Iterations) & " iterations with " &
     28      Duration'Image (Ada.Real_Time.To_Duration(Period)) &
     29      "s period"
     30   );
    2231   Next_Wakeup := Ada.Real_Time.Clock + Period;
    2332   for Count in 1..Iterations loop
     
    3645   end loop;
    3746
    38    Ada.Text_Io.Put_Line ("Average delay is" & Duration'Image (Ada.Real_Time.To_Duration (Average_Span)) & "s");
    39    Ada.Text_Io.Put_Line ("Maximum delay is" & Duration'Image (Ada.Real_Time.To_Duration (Max_Span)) & "s");
    40    Ada.Text_Io.Put_Line ("Minimum delay is" & Duration'Image (Ada.Real_Time.To_Duration (Min_Span)) & "s");
    41 end Delay_Until_Test;
     47   Ada.Text_Io.Put_Line (
     48      "Average delay is" &
     49      Duration'Image (Ada.Real_Time.To_Duration (Average_Span)) &
     50      "s"
     51   );
     52   Ada.Text_Io.Put_Line (
     53      "Maximum delay is" &
     54      Duration'Image (Ada.Real_Time.To_Duration (Max_Span)) &
     55      "s"
     56   );
     57   Ada.Text_Io.Put_Line (
     58      "Minimum delay is" &
     59       Duration'Image (Ada.Real_Time.To_Duration (Min_Span)) &
     60       "s"
     61   );
     62   Ada.Text_Io.Put_Line ("*** END OF Delay Until Variation Test ***");
     63end Delay_Until;
Note: See TracChangeset for help on using the changeset viewer.