#DOCUMENTATION by cg
class: TimeDuration
comment/format in: #getSeconds
changed: #quotientFromPhysicalValue: (send #getSeconds instead of #seconds)
--- a/TimeDuration.st Thu Sep 21 18:51:32 2017 +0200
+++ b/TimeDuration.st Thu Sep 21 18:51:39 2017 +0200
@@ -659,20 +659,6 @@
"
"Modified (comment): / 12-06-2017 / 20:50:56 / cg"
-!
-
-productFromNumber:aNumber
- "sent when an integer does not know how to multiply the receiver.
- Return a new timeDuration"
-
- ^ self species basicNew
- setMilliseconds:(self getMilliseconds * aNumber) asInteger
-
- "
- 5.1 * (TimeDuration fromString:'10s')
- "
-
- "Modified (comment): / 12-06-2017 / 20:50:51 / cg"
! !
!TimeDuration methodsFor:'converting'!
@@ -760,12 +746,27 @@
^ aTimestamp subtractMilliseconds:(self getMilliseconds)
!
+productFromNumber:aNumber
+ "sent when an integer does not know how to multiply the receiver.
+ Return a new timeDuration"
+
+ ^ self species basicNew
+ setMilliseconds:(self getMilliseconds * aNumber) asInteger
+
+ "
+ 5.1 * (TimeDuration fromString:'10s')
+ "
+
+ "Modified (comment): / 12-06-2017 / 20:50:51 / cg"
+!
+
sumFromTimestamp:aTimestamp
"return the timestamp this timeDuration after aTimestamp"
^ aTimestamp addMilliseconds:(self getMilliseconds)
! !
+
!TimeDuration methodsFor:'printing'!
addPrintBindingsTo:aDictionary language:languageOrNil
@@ -1237,11 +1238,12 @@
!
getSeconds
- "return the number of seconds"
+ "return the number of seconds (truncated)"
^ timeEncoding // 1000
"Modified: / 18-07-2007 / 13:44:37 / cg"
+ "Modified (comment): / 21-09-2017 / 18:50:03 / cg"
!
possiblyNegatedValueFromTimeEncodingInto:aBlock