> the most simply usable, value to store in the CVT is CPU time used minus TOD 
> clock value at time of dispatch

Which does not currently exist, right? You are suggesting that IBM might add 
this?

> perhaps not in time for Bill to read

Or me to assimilate, obviously. <g>

Are we re-inventing the wheel here? What's wrong with TIMEUSED, other than (for 
my purposes, if not the OP) that it requires a call out to assembler while ASCB 
or TCB arithmetic may be done directly in C (and perhaps even in COBOL)?

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Wednesday, December 21, 2016 10:15 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL inline CPU timer

On Wed, 21 Dec 2016 09:50:18 -0500, Charles Mills wrote:
>
>> when you say "despatch", I think "mail room" or "loading bay". As plain as 
>> possible is fine with me.
>
>Perhaps not quite the official explanation but dispatch = your task getting 
>control/usage of a CPU: the last time your program "woke up." I would say that 
>if you are measuring the CPU time used in some large span of code including 
>I/O then the CPU time figure will be pretty good. If you are measuring how 
>long it took you to compute pi to ten digits, then you could conceivably end 
>up with zero, because it was all computed since you "got" the CPU most 
>recently.
> 
I had pondered this issue in the past and decided that the most useful, though 
not the most simply usable, value to store in the CVT is CPU time used minus 
TOD clock value at time of dispatch.  Then the programmer could STCK(F), add 
that magic value in the CVT, and get instantaneous CPU time used.  Yes, I know 
there's a timing window and that it can be shut with more code.

>Perhaps others here have a strategy for forcing a new dispatch. Does the 
>TIMEUSED macro force a dispatch?
> 
I mentioned, perhaps not in time for Bill to read, a colleague who used a 
neutral Change Priority SVC to force dispatch.

----------------------------------------------------------------------
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