comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Time_Span and Hardware resolutions
Date: Mon, 09 Dec 2002 20:03:40 GMT
Date: 2002-12-09T20:03:40+00:00	[thread overview]
Message-ID: <wG6J9.294847$NH2.20523@sccrnsc01> (raw)
In-Reply-To: at2auk$fjf$1@newstoo.ericsson.se

> I have a Ada.Real_Time.Time_Span parameter as an in parameter to a
> procedure.
>...
> If I get 37 milliseconds as a parameter I must convert the value of that to
> be in steps of 100 us (microseconds).
How about:
  function Hardware_Ticks(T : in Ada.Real_Time.Time_Span) return Integer is
  begin
    return T/Ada.Real_Time.Microseconds(100);
  end Hardware_Ticks;
or the obvious changes to round up instead of truncate.



      reply	other threads:[~2002-12-09 20:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-09 15:05 Time_Span and Hardware resolutions Sebastian
2002-12-09 20:03 ` tmoran [this message]
replies disabled

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