AbstractTime.st
changeset 7007 9af8cc2f82a4
parent 6888 d75cbe2e8ef7
child 7010 13fcdfdc95b1
equal deleted inserted replaced
7006:8813a36f7645 7007:9af8cc2f82a4
   151 
   151 
   152     ^ Array with:(Date today) with:(Time now)
   152     ^ Array with:(Date today) with:(Time now)
   153 
   153 
   154     "
   154     "
   155      Time dateAndTimeNow
   155      Time dateAndTimeNow
       
   156      Date dateAndTimeNow
   156     "
   157     "
   157 
   158 
   158     "Modified: 19.4.1996 / 15:23:37 / cg"
   159     "Modified: 19.4.1996 / 15:23:37 / cg"
   159 !
   160 !
   160 
   161 
   169     "
   170     "
   170 
   171 
   171     "Modified: 1.7.1996 / 15:20:10 / cg"
   172     "Modified: 1.7.1996 / 15:20:10 / cg"
   172 ! !
   173 ! !
   173 
   174 
   174 !AbstractTime class methodsFor:'Compatibility - VW'!
   175 !AbstractTime class methodsFor:'Compatibility - Squeak'!
   175 
   176 
   176 totalSeconds
   177 dateAndTimeFromSeconds: secondCount
       
   178     ^ Array
       
   179         with: (Date fromSeconds: secondCount)
       
   180         with: (Time fromSeconds: secondCount \\ 86400)
       
   181 
       
   182     "
       
   183      Time dateAndTimeFromSeconds: (Time totalSeconds) 
       
   184      Date dateAndTimeFromSeconds: (Time totalSeconds)
       
   185     "
       
   186 !
       
   187 
       
   188 primSecondsClock
   177     "returns an internal second clock. Dont interpret the returned
   189     "returns an internal second clock. Dont interpret the returned
   178      value - if at all, use it to compute time deltas, by subtracting
   190      value - if at all, use it to compute time deltas, by subtracting
   179      returned values."
   191      returned values."
   180 
   192 
   181     ^ self secondClock
   193     ^ self secondClock
       
   194 ! !
       
   195 
       
   196 !AbstractTime class methodsFor:'Compatibility - VW'!
       
   197 
       
   198 totalSeconds
       
   199     "returns the number of seconds since 1.1.1901"
       
   200 
       
   201     ^ AbsoluteTime now utcSecondsSince1901
   182 ! !
   202 ! !
   183 
   203 
   184 !AbstractTime class methodsFor:'private instance creation'!
   204 !AbstractTime class methodsFor:'private instance creation'!
   185 
   205 
   186 fromOSTime:osTime
   206 fromOSTime:osTime
   953 ! !
   973 ! !
   954 
   974 
   955 !AbstractTime class methodsFor:'documentation'!
   975 !AbstractTime class methodsFor:'documentation'!
   956 
   976 
   957 version
   977 version
   958     ^ '$Header: /cvs/stx/stx/libbasic/AbstractTime.st,v 1.37 2002-11-26 09:04:49 cg Exp $'
   978     ^ '$Header: /cvs/stx/stx/libbasic/AbstractTime.st,v 1.38 2003-02-05 09:53:57 penk Exp $'
   959 ! !
   979 ! !