Re: Real Time IO routines



--
-- Simple answer is to build a IO package and use Unchecked_Conversion
--
with Ada.Real_Time ;
with Ada.Text_IO ;
--
--
--
use Ada.Real_Time ;
use Ada.Text_IO ;

with Ada.Unchecked_Conversion ;

procedure z is

--
-- I/O Time ( Duration ) type.
--
package D_IO is new Ada.Text_IO.Fixed_IO ( Duration ) ;

--
-- convert Ada.Real_Time private Time to a local type.
--
function To_Duration is new Ada.Unchecked_Conversion
( Time, Duration ) ;


Time_Value : Time ;

begin

Time_Value := Clock ;

Put ( "Time := " ) ;
D_IO.Put ( To_Duration ( Time_Value ) ) ;

New_Line ;

end z ;

In <1193410739.367181.96050@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, andrew <andrew.carroll@xxxxxxxxxxx> writes:
Hello,

Is there a put or put_line procedure to output the value of variables
declared as the Time type defined in the Real_Time package?


.



Relevant Pages

  • Re: How to setup Task&Duration to be Ongoing?
    ... In the classic set of project definitions, a 'task' is ALWAYS a package of work that produces a specific, measurable, observable deliverable - 1 program module, one hole in the ground, one wall covered with paint, 100 widgets, etc. ... Even variable length hammock tasks, such as a project management task that lasts for whatever the total duration of the project happens to be at the moment, still have an exact, measurable, and predictable duration. ... If your project contains tasks that are even ABLE to be terminated at some arbitrary point in time independent of the moment of creation of a required deliverable, you seriously need to rethink your project's work breakdown structure. ...
    (microsoft.public.project)
  • Re: Trouble with variable scoping
    ... package main; ... the enclosing scope, which, in this case, is file scope. ... duration of the scope of the C, ... $x would be, but only by fully qualifying it, as $me::x. ...
    (perl.beginners)
  • Re: /o regex question
    ... smackdab wrote: ... > If I use the /o on a regex, is it available package wide for the ... > duration of the program or is it bound by some other scope??? ...
    (comp.lang.perl.misc)
  • Re: Clearing Out DTS Package Logs
    ... In terms of duration,, the package ... I'm not certain if all the packages have package logging but many do. ... The issue we are having is that these logs are beginnning to fill up the ... Is there a way to schedule a package, run a script,or is ...
    (microsoft.public.sqlserver.dts)