TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Tom Moran <[log in to unmask]>
Reply To:
Tom Moran <[log in to unmask]>
Date:
Wed, 15 Nov 2000 14:14:11 PDT
Content-Type:
text/plain
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