From: Hal Fulton Date: 2003-11-24T12:53:08+09:00 Subject: Re: Time#succ ? Yukihiro Matsumoto wrote: > Hi, > > In message "Time#succ ?" > on 03/11/24, Hal Fulton writes: > > |Should this be added? It would enable the creation > |of Time ranges like t1..t2 and so on. > | > |I'd assume that seconds would be the default resolution > |(although the actual resolution is platform-dependent). > > I like the idea. How should I treat sub-second value? > > n = Time.now > p n.to_f # 1069633904.88943 > p n.succ.to_f # 1069633905.88943 or 1069633905.0 or 1069633906.0? I would expect the first case. Then n.succ.to_f would behave the same as (n+1).to_f, isn't that correct? Hal