Fwd: Accuracy of system timing on Intel vs Sun vs whatever?
Posted in 2009
Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. ---------- Forwarded message ---------- From: Art Kagel <art.kagel@gmail.com> Date: Sun, Aug 2, 2009 at 5:26 PM Subject: Re: Accuracy of system timing on Intel vs Sun vs whatever? To: Ian Michael Gumby <im_gumby@hotmail.com> Yes. I did tests a few years ago on Solaris, HPUX and a couple of other UNIXes (Linux on AMD later). This is from memory, but I can give you my test app to run yourself. Using the UNIX getdateandtime() system call from C Sun/Sparc/Solaris was about 1/300 sec resolution, HPUX about 1/125 sec, AIX 1/200, Linux/AMD 1/153000 sec Art Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Sun, Aug 2, 2009 at 4:59 PM, Ian Michael Gumby <im_gumby@hotmail.com>wrote: > Ok, > > While I'm using Java, it would be the same for C/C++. > > System.currentTimeMillis() returns the current system time in milliseconds. > Note that depending on the hardware, the granularity of the time will vary. > > If you're timing a series of events, you can use System.nanoTime() which > will return the current time in terms of nanoseconds. > > Now this is supposed to be as accurate as you can get, but still, there is > some drift and I'm not sure of the granularity, even at this level. > > Has anyone tested the accuracy of this type of function on multiple > processors, ie Intel, Sparc, PA-Risc, PowerPC, etc ...? > > Which processor will give you the best granularity and accuracy? (Also I > guess I should include OS since you could be running Windows (ick!), Linux, > AIX/Solaris/HP-UX, <insert your OS here>. > > Danke! > > > ------------------------------ > Get back to school stuff for them and cashback for you. Try BingT now.<http://www.bing.com/cashback?form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1> > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list > >