home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14055 < prev    next >
Encoding:
Text File  |  1992-08-15  |  1.2 KB  |  31 lines

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