🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.asm370
Article #666

Re: Time conversion

#666
From: Phil Howard KA9WGN
Date: Fri, 12 Apr 1991 05:21
40 lines
2598 bytes
ZPRM%AACC@CUNYVM.CUNY.EDU (ZPRM000) writes:

>We are suprised with all the great info about the TOD conversion.
>We are trying one of them now.
>We wrote a program that runs under CICS that gives a pageable
>screen showing termids, virt addresses, real addresses and user
>operator info. We want to show the time the term was last active
>but cant seem to find any fields in the CICS that contain this time.
>There is a field in the SNT that is supose to be a time stamp
>in STCK format but its only 4 bytes. Any ideas?

The upper 4 bytes of the STCK timestamp is effectively stepped every
1.048576 seconds.  It would be SIMPLEST to just take the upper 4 bytes
of the STCK timestamp and apply the conversions by filling in the
lower 4 bytes with 0's.

HOWEVER it is POSSIBLE they MIGHT be taking the full STCK and shifting it
to the right by 12 bits then dividing by one million exactly to come up
with an integer that is effectively incremented every 1.000000 seconds.

The reason to do that is that it would appear to SOME people that it is
easy to make date calculations on something that is stepped every 1.000000
seconds instead of something that is stepped every 1.048576 seconds.

It is in fact a slight bit faster to make such conversions, but not worth
doing the extra work to save a timestamp in this form.  My recommendation
is to save timestamps in STCK format or part thereof in binary.  Remember
if you must optimize for speed, optimize that which is executed the most.

But timestamps are not worth optmizing much either way.

Anyway you better check and see what method they are using.  Try assuming
the values are just the upper half of the STCK and see what results you
get.  If the answers are not "really close" then it is probably the other
method.
-- 
 /***************************************************************************\
/ Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu                              \
\ Lietuva laisva -- Brivu Latviju -- Eesti vabaks                             /
 \***************************************************************************/
Technical Details
Message-ID: <1991Apr12.052151.1180@ux1.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!caen!uwm.edu!ux1.cso.uiuc.edu!phil
References: <9104111701.AA13236@ucbvax.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!caen!uwm.edu!ux1.cso.uiuc.edu!phil
From: phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN)
Newsgroups: comp.lang.asm370
Subject: Re: Time conversion
Message-ID: <1991Apr12.052151.1180@ux1.cso.uiuc.edu>
Date: 12 Apr 91 05:21:51 GMT
References: <9104111701.AA13236@ucbvax.Berkeley.EDU>
Distribution: inet
Organization: University of Illinois at Urbana
Lines: 40