|
> Is there ay way to get values in the smallest three > places? I remember a C function that Scott > posted, but I can't seem to find it in the archive... http://archive.midrange.com Search all 'microsecond' This brings back a bunch of hits, including Scott's 'gettimeofday' wrapper. In particular, look at the thread entitled ' Mcsec in Timestamp, is it possible, ' http://archive.midrange.com/midrange-l/200102/threads.html#00778 In the spirit of trying to explain the underlying principles rather than blindly posting code, if you are trying to measure something with microsecond resolution you should read the thread in detail, particularly postings by Barbara and Leif. The returned value may be unique, but it might not actually represent microseconds of elapsed time. The whole issue of hardware/software clock is another thing to consider, and another set of searches will probably be needed. The MI instruction MATMATR has some information on the hardware clock: http://publib.boulder.ibm.com/iseries/v5r1/ic2924/tstudio/tech_ref/mi/ index.htm Check the bit about the standard time format. These MI instructions can be used in RPG by calling them out of the C MI library. The reference there is the MI Library Reference, which I have in .pdf form and therefore don't have a handy web reference for. If you just want a unique stamp, any of the methods in the archives should work for you, but you might consider a UUID for that instead. It depends on what the business need is. --buck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.