From: Bart Z. Lederman [lederman@star.enet.dec.DISABLE-JUNK-EMAIL.com] Sent: Wednesday, April 02, 2003 7:35 AM To: Info-VAX@Mvb.Saic.Com Subject: Re: Determining run time In article <7112dd15.0304011351.1fe61273@posting.google.com>, texascheryl@hotmail.com (Cheryl Hoefelmeyer) writes: > >What command(s) is/are used to get the timing? I'd like to try this >experiment myself. > >Thanks, >Cheryl I didn't see the original post. However: when I want to time something in DCL, this is what I use. $! The idea is to get the same output from a DCL procedure as would $! be obtained from LIB$INIT_TIMER and LIB$SHOW_TIMER, vis: $! $! ELAPSED: 0 00:00:06.59 CPU: 0:00:03.87 BUFIO: 23 DIRIO: 87 FAULTS: 1071 $! $ ctrlstr = - " ELAPSED: 0 !AS CPU: 0:!2ZL:!2ZL.!2ZL BUFIO: !SL DIRIO: !SL FAULTS: !SL" $! $! Save counts at beginning $! $ bt = F$CVTIME("", "ABSOLUTE", "TIME") $ bp = F$GETJPI("", "PAGEFLTS") $ bd = F$GETJPI("", "DIRIO") $ bb = F$GETJPI("", "BUFIO") $ bc = F$GETJPI("", "CPUTIM") $! $!!! the operation to be timed goes here $ dir/out=nl: $! $ ec = F$GETJPI("", "CPUTIM") $ eb = F$GETJPI("", "BUFIO") $ ed = F$GETJPI("", "DIRIO") $ ep = F$GETJPI("", "PAGEFLTS") $ et = F$CVTIME("", "ABSOLUTE", "DATETIME") $! $! Save counts at end (above), then calculate differences. $! $ dc = ec - bc $ db = eb - bb $ dd = ed - bd $ dp = ep - bp $! $! Getting times to subtract calls for some manipulation $! $ dt = F$CVTIME(et + " -0-" + bt, "ABSOLUTE", "TIME") $! $! need to separate minutes, seconds, and hundreths. $! $ dcs = dc / 100 $ dcc = dc - (dcs * 100) $ dcm = 0 $ IF dcs .GT. 60 $ THEN $ dcm = dcs / 60 $ dcs = dcs - (60 * dcm) $ ENDIF $! $ WRITE SYS$OUTPUT F$FAO(ctrlstr, dt, dcm, dcs, dcc, db, dd, dp) $! $ EXIT -- B. Z. Lederman Personal Opinions Only Posting to a News group does NOT give anyone permission to send me advertising by E-mail or put me on a mailing list of any kind. Please remove the "DISABLE-JUNK-EMAIL" if you have a legitimate reason to E-mail a response to this post.