|
Yivi, This code works just fine. I used the sleep() function to make it wait and swapped the parms in %DIFF(). Hbnddir('QC2LE') dftactgrp(*no) actgrp(*new) D sleep PR 10U 0 ExtProc('sleep') D seconds 10U 0 value DBENCH S T DBENCHSECS S 4 0 DX S 9 0 /FREE BENCH = %TIME; // a whole lot of program // many reads, calculations and writes sleep(5); BENCHSECS = %DIFF(%TIME:BENCH :*S); dsply bench; dsply benchsecs; *INLR = *ON; /END-FREE Thank you, Matt Tyler WinCo Foods, LLC mattt@xxxxxxxxxxxxxx -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Yivi Sent: Wednesday, November 16, 2005 8:17 AM To: RPG programming on the AS400 / iSeries Subject: Re: elapsed time > > Delete/comment the line "DBENCHSECS S 4 0" and compile, no errors? > No, no errors. But no change in the final result either. Usually I define those external variables for clarity sake. Is that a problem? > Define BENCH as type Z (timestamp), not type T (time). > Same result. I didn't think that should matter. Both data types have seconds, and are valid for the %TIME and %DIFF functions, right? > Also, you might want to increase DBENCHSECS to 5,0, because at 4,0 I realize that at 4.0 I am constrained in how many seconds I can count at, but the programs I am testing take between 20' and 70' on each iteration. Since the benchmarking code won't go into production, I can do with 4.0 (or 5.0, or 10.0 for the matter; it's really not important). Regards, I.-
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.