Article 160265 of comp.os.vms:
Here's some DCL I picked up somewhere, sometime.

-----------------------------------------------------------------------------
$! SETIME.COM
$ verify = 'f$verify("NO")'
$!-----------------------------------------------------------------------------
$!   SETTIMER.COM - The function of this routine is to initialize global
$!	symbols to record the current CPU time, page faults, buffer I/O and
$!	direct I/O.  When DISPTIMER.COM is called these values will be
$!	used to calculate the amount of each of the above that was used.
$!-----------------------------------------------------------------------------
$! 10-Aug-1983	R. A. Harris	Initial Coding.
$!-----------------------------------------------------------------------------
$ timer_cputim == f$getjpi("","cputim")
$ timer_pageflts == f$getjpi("","pageflts")
$ timer_bufio == f$getjpi("","bufio")
$ timer_dirio == f$getjpi("","dirio")
$ if verify then set verify	!'f$verify("NO")'

----------------------------------------------------------------------------
$! GETIME.COM
$ verify = 'f$verify("NO")'
$!-----------------------------------------------------------------------------
$!   DISPTIMER.COM - The function of this routine is to calculate the amount
$!	of CPU time, page faults, buffer I/O and direct I/O used since
$!	SETTIMER.COM was called and to display these values.
$!-----------------------------------------------------------------------------
$! 10-Aug-1983	R. A. Harris	Initial Coding.
$!-----------------------------------------------------------------------------
$ cputim   = f$getjpi("","cputim")   - timer_cputim 
$ pageflts = f$getjpi("","pageflts") - timer_pageflts 
$ bufio    = f$getjpi("","bufio")    - timer_bufio 
$ dirio    = f$getjpi("","dirio")    - timer_dirio 
$!
$ seconds = cputim / 100
$ hundredths = cputim - ( seconds * 100 )
$!
$ ctl = "CPU=!UL.!2ZL  Page Faults=!UL  Buffered I/O=!UL  Direct I/O=!UL"
$ msg = f$fao(ctl,seconds,hundredths,pageflts,bufio,dirio)
$ write sys$output msg
$ if verify then set verify	!'f$verify("NO")'


