TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Subject:
From:
Tom Moran <[log in to unmask]>
Date:
Wed, 15 Nov 2000 14:14:11 PDT
Reply-To:
Tom Moran <[log in to unmask]>
Parts/Attachments:
text/plain (13 lines)
>when you compile and run this you will notice that the time for the eighth
>note is way off.  Any ideas as to why this is?
  Measurement error.
  When you start a timing sequence, Next_Time is not the current time,
but rather the time the last "delay until Next_Time" ended.  Since
then you've done various IO etc.  In each section, change the initial pair:
       Time_Start         := Ada.Real_Time.Clock;
       Next_Time       := Next_Time + Delta_xxx_Note;
to
       Time_Start         := Ada.Real_Time.Clock;
       Next_Time       := Time_Start + Delta_xxx_Note;
and the times come out nicely similar.

ATOM RSS1 RSS2