Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!mintaka!ai-lab!rice-chex!jpexg From: jpexg@rice-chex.ai.mit.edu (John Purbrick) Newsgroups: comp.sys.atari.st.tech Subject: Re: Reading the timer Message-ID: <12455@life.ai.mit.edu> Date: 18 Dec 90 06:24:14 GMT References: <17750001@hpgnd.grenoble.hp.com> <2783@atari.UUCP> Sender: news@ai.mit.edu Organization: MIT Artificial Intelligence Laboratory Lines: 16 In article <2783@atari.UUCP> apratt@atari.UUCP (Allan Pratt) writes: > >There is a system variable that holds the time since the system was >booted, in 1/200ths of a second. For measuring time spans, this works, >but you still can't get real time-of-day any more precisely than two >seconds. > Well--you could keep reading the seconds clock until it changes (thus giving a fix for the end of a second) and store the contents of the 200ths-of-a- second counter (or the 60ths/70ths, if you prefer it) at that moment. Then calculate the remainder when the difference between the count "now" and "then" is divided by 200 | 70 | 60. This gives the number of time quanta since the last increment of the seconds clock. John Purbrick