home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / adav313.zip / gnat-3_13p-os2-bin-20010916.zip / emx / gnat / examples / instr-child.adb < prev    next >
Text File  |  2000-07-19  |  632b  |  20 lines

  1. with Gnat.Io; use Gnat.Io;
  2. package body Instr.Child is 
  3.  
  4.    procedure Display_Value (C : Accurate_Clock) is 
  5.    begin 
  6.       Display_Value (Clock (C));
  7.       Put (":"); 
  8.       Put (Character'Val (Character'Pos ('0') + (C.MilliSec / 100) mod 10));
  9.       Put (Character'Val (Character'Pos ('0') + (C.MilliSec / 10) mod 10));
  10.       Put (Character'Val (Character'Pos ('0') + C.MilliSec mod 10));
  11.    end Display_Value;
  12.       
  13.    procedure Increment (C : in out Accurate_Clock; Inc : Integer := 1) is 
  14.    begin
  15.      Increment (Clock (C), (C.MilliSec + Inc) / 1000);
  16.      C.MilliSec := (C.MilliSec + Inc) mod 1000;
  17.    end Increment;
  18.  
  19. end;
  20.