Tcl Source Code

Check-in [523e36b232]
Login

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

Overview
Comment:fixes [4ee9b4f3e965a7da5133]: result of command `time` overflows by single iteration longer as 35 minutes (uses wide-int instead of int as result now).
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA3-256: 523e36b2326446cd11144dd940547956d3891637a251426cbef6f9172b5a7bbe
User & Date: sebres 2019-01-28 16:12:56.356
References
2019-01-28
16:28 Closed ticket [4ee9b4f3e9]: Single iteration time has 36 minute overflow plus 7 other changes artifact: e694535fdd user: sebres
Context
2019-02-24
17:05
No longer run socket test-cases on travis with OSX: There are too many random failures/hangups. check-in: d5a91ad9d9 user: jan.nijtmans tags: core-8-5-branch
2019-02-12
18:41
merge 8.5 (note: to avoid too many conflicts, merged using `fossil merge --baseline 0055a16a8b core-... check-in: 0e846f3e6f user: sergey.brester tags: sebres-8-5-timerate
2019-01-28
16:15
merge 8.5 check-in: 99fa18a640 user: sebres tags: core-8-6-branch
16:12
fixes [4ee9b4f3e965a7da5133]: result of command `time` overflows by single iteration longer as 35 mi... check-in: 523e36b232 user: sebres tags: core-8-5-branch
2019-01-25
13:43
Do not assume that literals have a non-NULL bytes field; user code could purge it. check-in: da7b45afb4 user: dkf tags: core-8-5-branch
Changes
Unified Diff Ignore Whitespace Patch
Changes to generic/tclCmdMZ.c.
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
#endif

    if (count <= 1) {
	/*
	 * Use int obj since we know time is not fractional. [Bug 1202178]
	 */

	objs[0] = Tcl_NewIntObj((count <= 0) ? 0 : (int) totalMicroSec);
    } else {
	objs[0] = Tcl_NewDoubleObj(totalMicroSec/count);
    }

    /*
     * Construct the result as a list because many programs have always parsed
     * as such (extracting the first element, typically).







|







3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
#endif

    if (count <= 1) {
	/*
	 * Use int obj since we know time is not fractional. [Bug 1202178]
	 */

	objs[0] = Tcl_NewWideIntObj((count <= 0) ? 0 : (Tcl_WideInt)totalMicroSec);
    } else {
	objs[0] = Tcl_NewDoubleObj(totalMicroSec/count);
    }

    /*
     * Construct the result as a list because many programs have always parsed
     * as such (extracting the first element, typically).