[Pharo-project] Timespan #intersection: yields wrong result
johan at inceptive.be
Tue May 3 20:58:45 CEST 2011
On 03 May 2011, at 20:44, Brent Pinkney wrote:
> I wrote this Chronology stuff, so I can assure you that the behaviour is deliberate. You never want overlapping timespans. ever :)
> Let me know if you want some more details.
Yes, please, because it's not making sense to me.
I understand "overlapping timespans" as timespans that have a non-empty intersection, so I cannot follow that remark.
The intersection of 2 timespans is implemented to be smaller (exactly one clockPrecision unit) than it really is?
In the end, because I'm working with timespans in a scheduling application, I get funny gaps of a nanosecond between the timespans.
Mind that I understand that timespans are left-closed right-open intervals. The point is that the "right end" is a nanosecond off after taking the intersection, imho.
What is even funnier is that if you loop the script I sent, you eventually end up with an empty intersection... because it gets smaller all the time.
So yes, I cannot understand that :-(
More information about the Pharo-project