Skip to content

Commit 609cd62

Browse files
authored
Merge pull request #1271 from dsbos/patch-3
Fixed/improved some wording and punctuation.
2 parents 3646bd3 + deed1b0 commit 609cd62

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

_overviews/core/futures.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1003,28 +1003,28 @@ To simplify handling of time in concurrent applications `scala.concurrent`
10031003
general time abstraction. It is meant to be used with concurrency libraries and
10041004
resides in `scala.concurrent` package.
10051005

1006-
`Duration` is the base class representing length of time. It can be either finite or infinite.
1007-
Finite duration is represented with `FiniteDuration` class which is constructed from `Long` length and
1008-
`java.util.concurrent.TimeUnit`. Infinite durations, also extended from `Duration`,
1009-
exist in only two instances , `Duration.Inf` and `Duration.MinusInf`. Library also
1006+
`Duration` is the base class representing a length of time. It can be either finite or infinite.
1007+
A finite duration is represented with the `FiniteDuration` class, which is constructed from a `Long` length and
1008+
a `java.util.concurrent.TimeUnit`. Infinite durations, also extended from `Duration`,
1009+
exist in only two instances, `Duration.Inf` and `Duration.MinusInf`. The library also
10101010
provides several `Duration` subclasses for implicit conversion purposes and those should
10111011
not be used.
10121012

1013-
Abstract `Duration` contains methods that allow :
1013+
Abstract `Duration` contains methods that allow:
10141014

10151015
1. Conversion to different time units (`toNanos`, `toMicros`, `toMillis`,
10161016
`toSeconds`, `toMinutes`, `toHours`, `toDays` and `toUnit(unit: TimeUnit)`).
10171017
2. Comparison of durations (`<`, `<=`, `>` and `>=`).
10181018
3. Arithmetic operations (`+`, `-`, `*`, `/` and `unary_-`).
10191019
4. Minimum and maximum between `this` duration and the one supplied in the argument (`min`, `max`).
1020-
5. Check if the duration is finite (`isFinite`).
1020+
5. Checking whether the duration is finite (`isFinite`).
10211021

10221022
`Duration` can be instantiated in the following ways:
10231023

1024-
1. Implicitly from types `Int` and `Long`. For example `val d = 100 millis`.
1025-
2. By passing a `Long` length and a `java.util.concurrent.TimeUnit`.
1026-
For example `val d = Duration(100, MILLISECONDS)`.
1027-
3. By parsing a string that represent a time period. For example `val d = Duration("1.2 µs")`.
1024+
1. Implicitly from types `Int` and `Long`, for example, `val d = 100 millis`.
1025+
2. By passing a `Long` length and a `java.util.concurrent.TimeUnit`,
1026+
for example, `val d = Duration(100, MILLISECONDS)`.
1027+
3. By parsing a string that represent a time period, for example, `val d = Duration("1.2 µs")`.
10281028

10291029
Duration also provides `unapply` methods so it can be used in pattern matching constructs.
10301030
Examples:

0 commit comments

Comments
 (0)