[squeak-dev] Time oddity

hmm hmm at heeg.de
Tue Feb 18 14:01:03 UTC 2014


Am 18.02.2014 13:10, schrieb Stéphane Rollandin:
> Hello,
> 
> Any reason why
> 
> t := Time now.
> (t to: (t addSeconds: 5)) asDuration
> 
> never return the same value, which should be 5 seconds if I'm not
> missing something... ?
> 
> Stef

Time now has sub-second accuracy, but #addSeconds rounds to an integer 
second value (which is arguably wrong).
The difference is of course not exactly 5 seconds (unless you hit 
exactly a full second with Time now).

Cheers,
Hans-Martin


More information about the Squeak-dev mailing list