TimeForSpeed - Mantis updates

goran at krampe.se goran at krampe.se
Fri Sep 1 13:30:17 UTC 2006


Hi!

Brent Pinkney <brent.pinkney at aircom.co.za> wrote:
> Hi,
> 
> From the Mantis issue:
> I am nominally responsible for the Chronology package since I wrote it :)

Yup :)
  
> I have tested and reviewed this change. All tests pass in 3.8.1 (6744).
>  
> I would also encourage this enhancement to include Dan Ingall's modificaton
> which significantly speeds up printing a DateAndTime instance. 
> 
> All tests work with both enhancements. 
> I have attached my cleanup of Dan's code to this issue.
>  
>      suite := TestSuite new name: 'Chronology Tests'.
>      (SystemOrganization superclassOrder: #'Kernel-Chronology-Tests') 
>          do: [ :tc | tc addToSuiteFromSelectors: suite ].
>      suite run.
>  
> RESULT: 420 run, 420 passes, 0 expected failures, 0 failures, 0 errors...
>  
> I strongly encourage both changesets to be approved.

Cool! :) Even though the tests passes I might (not sure) have introduced
some subtle problems when creating Durations using non integer
arguments. I think my latest sweep of the code managed to get it right,
but I am just hoisting a small warning flag.

> ---------------------------------------------------------------------------------------------------------------
> > It would be nice if someone could summarize all Time related
> > classes and when to use which one. There is plenty of them these days.
> 
> I developed the Chronology class to precisely solve the problem of many Time classes.
> If you read the original wiki page (http://minnow.cc.gatech.edu/squeak/1871) I refer to
> my experience with Java/J++ where there were 6 different class libraries to choose from.

Ok, I read it and it explains quite a bit. We also have TimeStamp in the
3.8 image. It seems to me that TimeStamp (which has a Date and a Time)
is a "duplication" of DateAndTime.

> I added the support for nano second precision precisely to future-proof the design.
> 
> > For example, Date as you mention seems IMHO also like it still could be
> > stored as a julian day number. A "Date beast" with duration etc seems
> > like it probably could be called a Day instead. 
> 
> Perhaps, but a Date definately starts at midnight and ends 86400 later. So it
> has a duration. I chose Date as Day implies the sun is shining :)

Probably. It just seems odd to me (and to Bert) that it needs to contain
all that it contains today. I mean, in *essence* it should be enough
with the julian day number, right? Or what does the duration etc buy us
in this case?

regards, Göran



More information about the Squeak-dev mailing list