Re: get-real-time bug?
James M Grimes <[email protected]> Wed, 25 May 2005 17:26:39 -0700
| Newsgroups | gmane.comp.breve |
|---|---|
| Message-ID | <[email protected]> |
So I was wrong. That's never ever happened before! I was taking a my cue from unix systems' time() function (see 'man 3 time') which returns time since Jan 1st 1970 as an integral value. There's something in BSD Unix (and Mac OS X) which defines a "timespec" structure that includes nanosecond integers, but I didn't find a standard way to access that. Ironically, there was an easy way to do so in poor old Mac Classic. So I'd be curious to learn how you'll go about getting microsecond clock values. Thanks, jim Grimes On Wednesday, May 25, 2005, at 03:51 PM, jon klein wrote: > > On May 25, 2005, at 6:42 PM, James M Grimes wrote: > > I haven't seen a reply to this yet, so I'll put my two cents in, and > the real experts can correct me if I'm wrong. > > "get-real-time" returns an integer, or at least an integral value. The > manual says: > > get-real-time > Returns the number of seconds since January 1st, 1970 with > microsecond accuracy. > > which could imply a float return. However, the "microsecond accuracy" > only means that it will flip to the next integer with million to one > accuracy. I'm not sure what that means as far as accuracy over longer > durations, and obviously your computer would have to be synched to > world time to at least that accuracy to get absolute time (but hey, > we're running simulations, no?). > > > This explanation would allow me to cover up for a bug in my code, but > alas, it is a bug -- get-real-time should be returning time with > microsecond precision (the word I should have used instead of > "accuracy", I suppose). > > The problem has been fixed for the next release. > > - jon klein > > I'm not sure if this is a problem somewhere in my > code, but while "get-time" seems to update itself > properly, "get-real-time" seems to update the returned > value only once a second. > > _______________________________________________ > breve mailing list > [email protected] > http://lists.spiderland.org/mailman/listinfo/breve > ___________________________________________________ Disclaimer: Opinions stated herein are my own, and do not reflect policies or opinions of the Jet Propulsion Laboratory, NASA, or the California Institute of Technology. James M Grimes Phone: 1-818-354-3890 Jet Propulsion Laboratory Fax: 1-818-393-5239 Section 313 - Flight Systems E-mail: [email protected] Mailing Address: Office Location: 301-475U Jet Propulsion Laboratory, M/S 301-486 4800 Oak Grove Drive PASADENA CA 91109-8099 _______________________________________________ breve mailing list [email protected] http://lists.spiderland.org/mailman/listinfo/breve