comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <mcondic.auntie.spam@acm.org>
Subject: Re: Duration vs. Ada.Real_Time
Date: Wed, 31 Jan 2001 16:47:14 -0500
Date: 2001-01-31T21:46:55+00:00	[thread overview]
Message-ID: <3A7887E2.49CF12C5@acm.org> (raw)
In-Reply-To: 959u02$1o0$1@nnrp1.deja.com

Ted Dennison wrote:

> Is there some RTC hardware out there that uses seconds instead of Hz as
> its units? If so, and if its OS rescheduling primitive kept the same
> units, then yes, the Ada vendor for that platform should also use those
> same units.

Well, even if its hz, that doesn't mean Duration'Small can't have that
value. Let's say that the clock goes at 1000hz - Each tick is 1/1000 of a
second, correct? (1hz = 1 cycle/sec - unless senility is setting in? :-)
Duration'Small is 0.001. If the clock is at 1024hz then each tick is 1/1024
of a second. Duration'Small is 0.0009765625. (somewhere you have a
declaration: "for Duration'Small use 0.0009765625 ;" - change the target? -
change this statement in the compiler and off you go.)

All you're saying is that the LSB of Duration has some quantum value which
is measured in units of seconds. As long as this falls under 0.020, its
within the requirements of the Ada standard and Duration coincides nicely
with your available clock.

Now if your clock gives you an IEEE 80 bit floating point value, the story
has to change. I've just never seen one of those.

MDC
--
======================================================================
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]
======================================================================





  parent reply	other threads:[~2001-01-31 21:47 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
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 [this message]
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