File tree 1 file changed +4
-1
lines changed
procedural/timeline/src/main/kotlin/gov/nasa/ammos/aerie/procedural/timeline/util/duration
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -33,5 +33,8 @@ operator fun Duration.rem(divisor: Duration): Duration = this.remainderOf(diviso
33
33
operator fun Instant.plus (duration : Duration ): Instant = plusMillis(duration / MILLISECOND )
34
34
.plusNanos(1000 * ((duration % MILLISECOND ) / MICROSECOND ))
35
35
36
- /* * Subtracts a duration from an instant, to produce another instant . */
36
+ /* * Subtracts an instant from another instant, represented as a duration . */
37
37
operator fun Instant.minus (other : Instant ): Duration = microseconds(other.until(this , ChronoUnit .MICROS ))
38
+
39
+ /* * Subtracts a duration from an instant, to produce another instant. */
40
+ operator fun Instant.minus (duration : Duration ): Instant = this .plus(- duration)
You can’t perform that action at this time.
0 commit comments