totalSeconds returns the number of seconds since 1.1.1901 now
like squeak and visual works do
--- a/AbstractTime.st Tue Feb 04 18:55:21 2003 +0100
+++ b/AbstractTime.st Wed Feb 05 10:53:57 2003 +0100
@@ -153,6 +153,7 @@
"
Time dateAndTimeNow
+ Date dateAndTimeNow
"
"Modified: 19.4.1996 / 15:23:37 / cg"
@@ -171,9 +172,20 @@
"Modified: 1.7.1996 / 15:20:10 / cg"
! !
-!AbstractTime class methodsFor:'Compatibility - VW'!
+!AbstractTime class methodsFor:'Compatibility - Squeak'!
+
+dateAndTimeFromSeconds: secondCount
+ ^ Array
+ with: (Date fromSeconds: secondCount)
+ with: (Time fromSeconds: secondCount \\ 86400)
-totalSeconds
+ "
+ Time dateAndTimeFromSeconds: (Time totalSeconds)
+ Date dateAndTimeFromSeconds: (Time totalSeconds)
+ "
+!
+
+primSecondsClock
"returns an internal second clock. Dont interpret the returned
value - if at all, use it to compute time deltas, by subtracting
returned values."
@@ -181,6 +193,14 @@
^ self secondClock
! !
+!AbstractTime class methodsFor:'Compatibility - VW'!
+
+totalSeconds
+ "returns the number of seconds since 1.1.1901"
+
+ ^ AbsoluteTime now utcSecondsSince1901
+! !
+
!AbstractTime class methodsFor:'private instance creation'!
fromOSTime:osTime
@@ -955,5 +975,5 @@
!AbstractTime class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/AbstractTime.st,v 1.37 2002-11-26 09:04:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/AbstractTime.st,v 1.38 2003-02-05 09:53:57 penk Exp $'
! !