> if you look at system control blocks (such as TCBTTIME) you will not pick up the time since the last dispatch.
Which may or may not be satisfactory. If you are computing pi to a million digits on an otherwise idle machine and would like to know how much CPU time each pass through the main loop consumes, then TCBTIME is totally unsatisfactory. OTOH if you have a more normal sort of some IO/some computing/some system services type of program and would just like to know roughly how much CPU time you have consumed up to this point, then TCBTIME should be totally satisfactory. IMHO Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Peter Relson Sent: Wednesday, July 13, 2011 8:56 AM To: [email protected] Subject: Re: most efficient method to determine "used cpu time" within a particular subtask If by "within a particular subtask" you mean "not my task, but a subtask of it", then you're mostly on your own. There are no programming interfaces provided to accomplish that. And no control block fields that contain time for a task are programming interfaces. If you're interested in time for "my task", and if you happen to be running on a machine with the ECTG instruction available, then TIMEUSED ECTG=YES,STORADR=x is far and away the best. The output is not in "MIC", it will be in TOD clock units. Alternately, TIMEUSED ECTG=COND,STORADR=x,LINKAGE=SYSTEM can be used. It will get the fast path if ECTG is available, and a slower PC-entered path if ECTG is not available. As Binyamin correctly pointed out, if you look at system control blocks (such as TCBTTIME) you will not pick up the time since the last dispatch. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

