[Cuis-dev] Fix for TimeAndDate>>nanosecondsTick

Luciano Notarfrancesco luchiano at gmail.com
Sun Jan 11 11:43:52 PST 2026


Oops, that was wrong, this one looks correct to me now, but please review.

On Mon, Jan 12, 2026 at 2:37 AM Luciano Notarfrancesco <luchiano at gmail.com>
wrote:

> This fixes a bug in TimeAndDate class>>updateLastTickAndOffset and changes
> Random class>>new to call TimeAndDate nanosecondsTick instead of Time
> milisecondClockValue, so that if you create two random generators
> successively they will not have the same seed. Let me know what you think,
> maybe there is a cleaner alternative (perhaps generating the seed from the
> existing DefaultInstance if it is not nil).
>
> BTW, the bug is pretty obvious when you see the diff, but just in case you
> can test with:
> ((1 to: 100) collect: [:x| DateAndTime nanosecondsTick]) asSet size
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260112/2c135cdf/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DateAndTime#class-updateLastTickAndOffset.st
Type: application/octet-stream
Size: 741 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260112/2c135cdf/attachment.obj>


More information about the Cuis-dev mailing list