Could someone answer 4gb's 11-year-late question?

On Tuesday, April 17, 2018 at 11:53:30 PM UTC+3, 4gb...@gmail.com wrote:

> On Monday, September 3, 2007 at 4:38:21 PM UTC-7, Ludmila Koganer wrote:
> > Hi,
> > I need to subtract two TOD times to find elapsed time. Currently I
convert
> > the two TOD times with STCKCONV and determine the elaped time
individually,
> > and then compute the difference. This works. However I thought I could
> > optimize the conversion, a little bit and I was wondering why not
subtract the
> > two TOD times to begin with.
> >
> > As I understand TOD time is the number of mic seconds elapsed since
midnight
> > of 1900-01-01. So when I subtract one TOD value from another the
duration
> > must be in micro seconds.

> I'm 11 years late. Shouldn't you clear the low order 12 bits of each TOD
value before adding or subtracting them? Those low order bits are not
fractions of a microsecond, so including them in the math can produce up to
a micro second error. If you add a series of TOD values without clearing
the low bits that can add up to real money.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to