[Pkg] The Trunk: Chronology-Tests-ct.31.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jun 10 17:15:08 UTC 2022


Christoph Thiede uploaded a new version of Chronology-Tests to project The Trunk:
http://source.squeak.org/trunk/Chronology-Tests-ct.31.mcz

==================== Summary ====================

Name: Chronology-Tests-ct.31
Author: ct
Time: 10 June 2022, 7:14:53.837345 pm
UUID: 989ff157-f700-a04f-9051-8ba05c932351
Ancestors: Chronology-Tests-ct.30

Adds test for #busyWait with duration shorter than 1 milliSecond. Regression test for Chronology-Core-ct.80.

=============== Diff against Chronology-Tests-ct.30 ===============

Item was added:
+ ----- Method: DurationTest>>testBusyWaitMicro (in category 'tests') -----
+ testBusyWaitMicro
+ 	
+ 	| duration start elapsed |
+ 	duration := 1 microSecond.
+ 	start := DateAndTime now.
+ 	
+ 	1000 timesRepeat: [duration busyWait].
+ 	elapsed := DateAndTime now - start.
+ 	
+ 	self assert: elapsed >= (duration * 1000).
+ 	"self assert: elapsed <= (duration * 1000 * 2)."
+ 	"We cannot guarantee busy waits shorter than 1 millisecond. See comment in #busyWait. However, it is important that micro busy waits do delay the execution by AT LEAST the specified duration."!



More information about the Packages mailing list