'From Squeak3.7alpha of 11 September 2003 [latest update: #5816] on 12 March 2004 at 4:00:19 pm'! "Change Set: chronologyTimeStampNow-brp Date: 12 March 2004 Author: Brent Pinkney Deprecated class TimeStamp has second precision. After the introduction of the ANSI Chronology classes, TimeStamp is implemented as a subclass of DateAndTime - inadvertantly inheriting nano-second precision. This changest ensure that TimeStamp class>>#now and TimeStamp class>>current clear out the nanosecond field. Note. This means that (TimeStamp now = TimeStamp now) could be true. Fix TimeStampTest>>#testComparing to accomodate this."! !TimeStamp class methodsFor: 'squeak protocol' stamp: 'brp 3/12/2004 15:49'! current ^ self now ! ! !TimeStamp class methodsFor: 'ansi protocol' stamp: 'brp 3/12/2004 15:52'! now | ts ticks | ts _ super now. ticks _ ts ticks. ticks at: 3 put: 0. ts ticks: ticks offset: ts offset. ^ ts! ! !TimeStampTest methodsFor: 'Tests' stamp: 'brp 3/12/2004 15:54'! testComparing | ts1 ts2 ts3 c1 c2 le | ts1 := self timestampClass date: ('01-10-2000' asDate) time: ('11:55:00 am' asTime). ts2 := self timestampClass date: ('07-26-2003' asDate) time: ('22:09:45 am' asTime). ts3 := self timestampClass date: ('05-28-1972' asDate) time: ('04:31:14 pm' asTime). self assert: ts1 = timestamp; assert: ts1 hash = timestamp hash; assert: timestamp = timestamp copy; assert: ts1 < ts2; deny: ts1 < ts3. c1 := self timestampClass current. c2 := self timestampClass current. le _ (c1 <= c2). self assert: le. ! !