--- a/Timestamp.st Fri Dec 23 17:35:43 2005 +0100
+++ b/Timestamp.st Wed Dec 28 13:32:16 2005 +0100
@@ -855,7 +855,7 @@
millisecondDeltaFrom:aTimestamp
"return the delta in milliseconds between 2 absolute times.
- The argument is supposed to be AFTER the receiver"
+ The argument is supposed to be BEFORE the receiver"
^ self getMilliseconds - (aTimestamp getMilliseconds)
@@ -869,6 +869,24 @@
"
"Modified: / 5.6.1998 / 04:21:33 / cg"
+!
+
+secondDeltaFrom:aTimestamp
+ "return the delta in seconds between 2 absolute times.
+ The argument is supposed to be BEFORE the receiver"
+
+ ^ self getSeconds - (aTimestamp getSeconds)
+
+ "
+ |t1 t2|
+
+ t1 := Timestamp now.
+ Delay waitForSeconds:5.
+ t2 := Timestamp now.
+ t2 secondDeltaFrom:t1
+ "
+
+ "Modified: / 5.6.1998 / 04:21:33 / cg"
! !
!Timestamp methodsFor:'comparing'!
@@ -997,6 +1015,7 @@
"
! !
+
!Timestamp methodsFor:'printing & storing'!
addPrintBindingsTo:dict language:languageOrNil
@@ -1304,7 +1323,7 @@
!Timestamp class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.101 2005-06-16 08:53:14 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Timestamp.st,v 1.102 2005-12-28 12:32:16 cg Exp $'
! !
Timestamp initialize!