Blitz (1/64)

From:David McMinn
Date:2 Apr 2001 at 09:39:09
Subject:Re: OS GetAShape?

Hi John

> Is there a simple OS function for getting the number of ticks since
> system startup? I want to be able to timing and 50ths of a second would
> be fine, but the ticks function in Blitz always returns 0 for some reason.
> ISTR there is a field in a structure somewhere with that value, but I
> can't remember where it is.

What's this got to do with GetAShape then? ;)

You could try the E clock, but I'm not sure if that is the time since system
startup or not. Could be though.

NEWTYPE.sixtyfour
high.l
low.l
End NEWTYPE

DEFTYPE.sixtyfour e_val
freqeuncy_of_e_clock.l = ReadEClock_(&e_val)
; Number of E clock (based on master frequency of computer, different for
; PAL (709379Hz) and NTSC (715909Hz).

You can therefore get the time in fractions of a second between two ReadEClock_
calls by subtracting the first from the second and then dividing by the
frequency.



|) /\ \/ ][ |) |\/| c |\/| ][ |\| |\| | dave@blitz-2000.co.uk
http://members.nbci.com/david_mcminn | ICQ=16827694
Move aloud, nothing to hear, see?

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list/-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list/-help@netsoc.ucd.ie