comp.lang.ada
 help / color / mirror / Atom feed
* Trying to PUT a time
@ 2001-04-13 19:10 jhuber
  2001-04-13 19:36 ` Jeff Creem
  0 siblings, 1 reply; 2+ messages in thread
From: jhuber @ 2001-04-13 19:10 UTC (permalink / raw)


I've tried everything I can think of to print a
variable of type ADA.REAL_TIME_TIME.  Does anyone
know how I can do this?

TIA



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Trying to PUT a time
  2001-04-13 19:10 Trying to PUT a time jhuber
@ 2001-04-13 19:36 ` Jeff Creem
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Creem @ 2001-04-13 19:36 UTC (permalink / raw)


It is a private type. That means you have to use the operators in the
package where it is defined to work with it.

Given that, have you tried something like (with regrets to the
ghost of Mr. Dewar for not compiling this first!)

with Ada.Real_Time;
with Text_IO;
procedure Print_It is

The_Time : Ada.Real_Time.Time := Ada.Real_Time.Clock;
The_Seconds_Portion : Ada.Real_Time.Seconds_Count;
The_Timespan_Portion : Ada.Real_Time.Time_Span;

begin

  Ada.Real_Time.Split(T => The_Time, SC => The_Seconds_Portion, TS =>
The_Timespan_Portion);

  Text_IO.Put_Line("Seconds :"  &
Ada.Real_Time.Seconds_Count'image(The_Seconds_Portion));
  Text_IO.Put_Line("The Rest: " & Duration'image
     (Ada.Real_Time.To_Duration(The_Timespan_Portion)));

end Print_It;


It may not be exactly correct but should be close.

<jhuber@ellsworth.nlxcorp.com> wrote in message
news:EaIB6.266$tO6.2764@newsfeed.slurp.net...
> I've tried everything I can think of to print a
> variable of type ADA.REAL_TIME_TIME.  Does anyone
> know how I can do this?
>
> TIA





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-04-13 19:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-13 19:10 Trying to PUT a time jhuber
2001-04-13 19:36 ` Jeff Creem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox