comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Duration vs. Ada.Real_Time
Date: Fri, 26 Jan 2001 15:33:09 GMT
Date: 2001-01-26T15:33:09+00:00	[thread overview]
Message-ID: <94s5bl$r1r$1@nnrp1.deja.com> (raw)
In-Reply-To: 3A71814B.7E8CCF60@acm.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2156 bytes --]

In article <3A71814B.7E8CCF60@acm.org>,
  Marin David Condic <mcondic.auntie.spam@acm.org> wrote:
> So if you are concerned about portability, you'd use Duration
> only in applications where 20mSec of accuracy is sufficient.

This may be confusing, the question was not about precision
of Duration, it was about resolution of the timer

The value of Duration'Small is only an upper bound for
resolution, there is nothing in the RM that forbids an
implementation where clock only updates every second (and
indeed do not be surprised if some Unix implementations
are like this).


For portability, your use
> of Real_Time should never assume accuracy greater that
20uSec. If you don't
> need portability, then you can rely on whatever the
implementation gives you
> for Duration'Small etc.
>
> MDC
>
> Atle R�stad wrote:
>
> > Hi
> >
> > I have some code that has a max of 30 milliseconds to
process, and need to
> > measure if this is possible. But the requirement for
Duration is that
> > Duration'Small must be less then 20 milliseconds, and
> > Ada.Real_Time.Time_Unit must be less then 20 microseconds.
> >
> > I figured that using Duration could give imprecise result.
So I wrote a
> > small program to print out Duration'Small.
> >
> > I'm using gnat 3.12 and printed out both Duration'Small and
> > Real_Time.Time_Unit and they were both 1.0E-09. I thought
Duration'Small
> > would be larger then Real_Time.Time_Unit but they were the
same.
> >
> > Why should I use Real_Time when duration has the same
resolution?
> >
> > I will run the program on an Solaris 8. How will this
affect my time
> > measuring? What resolution can I expect?
> >
> > Thanks,
> > Atle
>
> --
>
===============================================================
=======
> Marin David Condic - Quadrus Corporation -
http://www.quadruscorp.com/
> Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o
m
> Visit my web site at:  http://www.mcondic.com/
>
>     "I'd trade it all for just a little more"
>         --  Charles Montgomery Burns, [4F10]
>
===============================================================
=======
>
>


Sent via Deja.com
http://www.deja.com/



  parent reply	other threads:[~2001-01-26 15:33 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <980495512.529981@edh3>
     [not found] ` <8mac6.9236$R5.473526@news1.frmt1.sfba.home.com>
2001-01-26 15:30   ` Duration vs. Ada.Real_Time Robert Dewar
     [not found] ` <3A71814B.7E8CCF60@acm.org>
2001-01-26 15:33   ` Robert Dewar [this message]
2001-01-26 20:58     ` Marin David Condic
2001-01-26 21:32       ` Ted Dennison
2001-01-27  5:01         ` Keith Thompson
2001-01-27 14:40           ` Marin David Condic
2001-01-27 14:34         ` Marin David Condic
2001-01-28  0:18           ` Robert Dewar
2001-01-29 14:54           ` Ted Dennison
2001-01-29 18:40             ` Marin David Condic
2001-02-08  3:32               ` Buz Cory
2001-02-08 15:34                 ` Marin David Condic
2001-02-10  3:08                   ` Steve Whalen
2001-01-28  0:13       ` Robert Dewar
2001-01-29 14:02         ` Marin David Condic
2001-01-30 14:33         ` Stephen Leake
2001-01-31 14:55           ` Marin David Condic
2001-01-31 16:03           ` Ted Dennison
2001-01-31 19:16             ` Marin David Condic
2001-01-31 20:53               ` Ted Dennison
2001-01-31 21:30                 ` tmoran
2001-01-31 21:47                 ` Marin David Condic
2001-02-01 14:18                   ` Ted Dennison
2001-01-28 19:32 ` Simon Wright
2001-01-31  6:13   ` Robert Dewar
2001-01-31 15:07     ` Marin David Condic
2001-02-01  5:43       ` Robert Dewar
2001-01-31  5:51 Christoph Grein
2001-02-01  6:27 ` Simon Wright
replies disabled

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