Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!sun-barr!newstop!texsun!vector!egsner!mic!convex!rosenkra From: rosenkra@convex.com (William Rosencranz) Newsgroups: comp.sys.atari.st.tech Subject: Re: Reading the timer Message-ID: <111333@convex.convex.com> Date: 15 Dec 90 05:04:09 GMT References: <17750001@hpgnd.grenoble.hp.com> Sender: news@convex.com Organization: Convex Computer Corporation; Richardson, TX Lines: 27 In article <17750001@hpgnd.grenoble.hp.com> alex@hpgnd.grenoble.hp.com (Alexis MERMET-GRANDFILLES) writes: >Hello there, > >1) > Does anybody know if there is a way ( should I say official ? ) > to read the system time of the 520STE that will give a result > more precise than 2 seconds intervals. > > The Bios or Xbios call GetTime() only returns hours,minutes, and > seconds divided by 2 ( ie from 0 to 30 ). > > I need something much more precise than that. Any idea? i wrote a gettimeofday(2) call which did the Gettime/Getdate, but also gets the current value of the 200 Hz timer (just a system variable, long at 0x4bc, access in Super mode). that gets u down to 5 ms which i then use to get the second and stuff the rest in the tv_usec field of the struct timeval (sys/time.h). if u can't figure it out, i can send it to you... -bill rosenkra@convex.com -- Bill Rosenkranz |UUCP: {uunet,texsun}!convex!c1yankee!rosenkra Convex Computer Corp. |ARPA: rosenkra%c1yankee@convex.com