Welcome, Guest. Please login or register.

Author Topic: EClock's precision with longer time periods...  (Read 940 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2869
    • Show only replies by Jose
EClock's precision with longer time periods...
« on: May 25, 2005, 12:35:07 AM »
Hi. The device's manual only states that EClock is the highest precision unit on the Amiga. But regarding VBlank it states that it can have higher precision than MicroHz  and Eclock.  So what's the limit that one should use EClock in favour of VBlank  :-?

[Edit] Yes, I put this question in another thread but I think it deserves it's own one, the RKM Devices should be more clear about that IMHO
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: EClock's precision with longer time periods...
« Reply #1 on: May 25, 2005, 12:59:12 AM »
Quote
But regarding VBlank it states that it can have higher precision than MicroHz and Eclock.

Where does it say that exactly?

Quote

   UNIT_VBLANK
 This unit uses a strobe from the power supply to keep track of its
 time or the "E" clock on machines without power supply strobes.
 It is very stable over time, but only has a resolution of that of
 the vertical blank interrupt.  This unit is very cheap to use, and
 should be used by those who are waiting for long periods of time
 (typically 1/2 second or more).  This unit uses a timeval in its
 timerequest.


This means VBLANK is only good for relatively long delays. VBLANK is also lighter for the OS to handle.

Quote
So what's the limit that one should use EClock in favour of VBlank

It's quite clearly explained above.
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2869
    • Show only replies by Jose
Re: EClock's precision with longer time periods...
« Reply #2 on: May 25, 2005, 01:51:59 AM »
@Piru
Hey 8-) Well, I'm reading the RKM Devices on the DevCD2.1 (the HTML version). Never saw what you posted there on the timer device chapter.

What I said above I found on: reference/HTML/Devices_Manual_guide/node00C0.html

It says, regarding VBLANK:
"The VBLANK timer unit is very stable and has a granularity comparable to the vertical blanking time. When you make a timing request, such as "signal me in 21 seconds," the reply will come at the next vertical blank after 21 seconds have elapsed. this timer has very low overhead and may be more accurate then the MICROHZ and ECLOCK units for long time periods. Keep in mind that the vertical blanking time varies depending on the display mode."

And regarding ECLOCK:
"The ECLOCK timer unit uses the Amiga E-Clock to measure the time interval you request. This is the most precise time measure available through the timer device"

That's all I can find there and I've read the whole chapter about the timer device. Maybe the HTML version lacks some things ? I'm using it cause my Amigas don't have CDROM ATM...
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: EClock's precision with longer time periods...
« Reply #3 on: May 25, 2005, 10:42:22 AM »
What exactly do you need?

If you need to create accurate short-interval (milliseconds to a few seconds) delays, the EClock is a good choice.

If you need to create longer delays, VBlank is a better choice, but naturally has a lower granularity. If your VBlank accuracy is say ~20ms (for 50Hz), that might be insignificant in  an overall delay of many seconds.
int p; // A
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: EClock's precision with longer time periods...
« Reply #4 on: May 25, 2005, 01:14:18 PM »
My quote is from timer.device autodoc (timer.doc).