home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!caen!destroyer!ubc-cs!eyes
- From: eyes@cs.ubc.ca (Eye Care Centre)
- Subject: Re: Better than TickCount?
- Message-ID: <1992Aug16.065400.19347@cs.ubc.ca>
- Sender: usenet@cs.ubc.ca (Usenet News)
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- References: <1992Aug16.023716.13162@midway.uchicago.edu> <Bt297z.tH@well.sf.ca.us>
- Date: Sun, 16 Aug 92 06:54:00 GMT
- Lines: 19
-
- In article <Bt297z.tH@well.sf.ca.us> oster@well.sf.ca.us (David Phillip Oster) writes:
- >
- >You can set up a time manager task to increment a global variable every
- >millisecond. Then use this variable like a TickCount. Beware, 2^32
- >milliseconds is not a lot of time. Make sure you handle wraparound of
- >the counter gracefullly
-
- Well, that's arguable, since 2^32 milliseconds is about 1193 hours (or about
- 49.7 days), which is longer than most people leave their Macs on (or avoid
- crashing ;). So, I wouldn't worry about it.
-
- On the other hand, if you update your counter every microsecond, you'll run
- out of bits after about 71.6 minutes.
-
- Bill Kiss
- Programmer/Peon
- Dept. of Ophthalmology, UBC
-
- PS. It's late Saturday night. I keep trashing the heap. I'm argumentative. :)
-