Tcl Source Code

Check-in [11760d10b0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:timerate: allow break from measurement cycle (usable to provide conditional stop possibility inside timerate)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sebres-8-5-timerate
Files: files | file ages | folders
SHA3-256:11760d10b0735e3382369c739c1344b979dc53234768604ded417bfa25902d17
User & Date: sergey.brester 2019-02-12 19:38:46
Context
2019-02-12
19:46
fixes estimated time of too short execution considering calibrated overhead (it is 0us and not 1us, ... check-in: cde1464889 user: sergey.brester tags: sebres-8-5-timerate
19:38
timerate: allow break from measurement cycle (usable to provide conditional stop possibility inside ... check-in: 11760d10b0 user: sergey.brester tags: sebres-8-5-timerate
19:35
cherrypick [8ad25ef9eb] from 8.6 - timerate: added dynamic factor by threshold calculation (avoid gr... check-in: fd80b4356e user: sergey.brester tags: sebres-8-5-timerate
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to generic/tclCmdMZ.c.

  4165   4165   	    /* precompiled */
  4166   4166   	    result = TclExecuteByteCode(interp, codePtr);
  4167   4167   	} else {
  4168   4168   	    /* eval */
  4169   4169   	    result = TclEvalObjEx(interp, objPtr, 0, NULL, 0);
  4170   4170   	}
  4171   4171   	if (result != TCL_OK) {
  4172         -	    goto done;
         4172  +	    /* allow break from measurement cycle (used for conditional stop) */
         4173  +	    if (result != TCL_BREAK) {
         4174  +		goto done;
         4175  +	    }
         4176  +	    /* force stop immediately */
         4177  +	    threshold = 1;
         4178  +	    stop = -0x7FFFFFFFFFFFFFFFL;
         4179  +	    result = TCL_OK;
  4173   4180   	}
  4174   4181   	
  4175   4182   	/* don't check time up to threshold */
  4176   4183   	if (--threshold > 0) continue;
  4177   4184   
  4178   4185   	/* check stop time reached, estimate new threshold */
  4179   4186       #ifdef TCL_WIDE_CLICKS