[Cuis-dev] Fix for TimeAndDate>>nanosecondsTick

Juan Vuletich juan at cuis.st
Mon Jan 12 05:10:22 PST 2026


Hi Luciano,

Great stuff! Important and subtle. IT is now at GitHub. Thank you!

Cheers,

On 2026-01-11 4:43 PM, Luciano Notarfrancesco via Cuis-dev wrote:
> 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
>
>
-- 
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260112/7226c071/attachment.htm>


More information about the Cuis-dev mailing list