[squeak-dev] Squeak 6.0: Chronology-Core-mt.81.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Wed Feb 22 10:44:02 UTC 2023


Actually, the algorithm in #nanosecondsToRunHighRes: accounts for that, but variation can be significant...

Thus, I would not recommend using #nanosecondsToRun: but use #bench for that instead.

Best,
Marcel
Am 22.02.2023 11:41:02 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
FYI: It takes a notable amount of nanoseconds to even fetch the high-res clock value ...

[ String new ] bench
" '72,900,000 per second. 13.7 nanoseconds per run. 8.29834 % GC time.' "

Best,
Marcel
Am 22.02.2023 11:39:44 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
Time startUp: true.
Time useHighResClockForTiming: true.
Time nanosecondsToRun: [ String new ]." 3193 "

Am 22.02.2023 11:27:55 schrieb commits at source.squeak.org <commits at source.squeak.org>:
Marcel Taeumel uploaded a new version of Chronology-Core to project Squeak 6.0:
http://source.squeak.org/squeak60/Chronology-Core-mt.81.mcz

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

Name: Chronology-Core-mt.81
Author: mt
Time: 22 February 2023, 11:27:44.882528 am
UUID: e4a5b396-8917-7f46-a6c7-a6961ff588af
Ancestors: Chronology-Core-ct.80

Fixes #highResClock usage by resetting the estimated #highResClockTicksPerMillisecond on system start-up. The preference #useHighResClockForTiming works now as well.

=============== Diff against Chronology-Core-ct.80 ===============

Item was changed:
----- Method: Time class>>startUp: (in category 'system startup') -----
startUp: resuming

resuming ifTrue: [
+ LastClockTick := 0.
+ HighResClockTicksPerMillisecond := 0 ]!
- LastClockTick := 0 ]!

Item was added:
+ ----- Method: Time class>>useHighResClockForTiming: (in category 'preferences') -----
+ useHighResClockForTiming: booleanOrNil
+
+ UseHighResClockForTiming := booleanOrNil.!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230222/d7e6b0ed/attachment-0001.html>


More information about the Squeak-dev mailing list