Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Duration] Add Duration.pod
Somewhat brief, again using information from S02 and S32::Temporal.
- Loading branch information
1 parent
60a108d
commit c0352f6
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| =begin pod | ||
| =TITLE Duration | ||
| class Duration is Cool does Real { } | ||
| A C<Duration> represents a length of time in atomic seconds, with | ||
| fractions. Like an L<Instant>, it is epoch-agnostic. In numeric contexts | ||
| (situations where a C<Duration> is used as a number), a C<Duration> will return | ||
| a either a L<Rat> or a L<FatRat> representing the number of seconds it holds. | ||
| C<Duration>s can be subtracted from or added to C<Instant>s to yield another, | ||
| new C<Instant>. A C<Duration> will come as a result of subtracting to | ||
| C<Instant>s. A C<Duration> can also come out of mathematical operations between | ||
| two C<Duration>s when it makes sense (namely, the addition, subtraction, or | ||
| modulous of two C<Duration>s). The type of object returned for other numeric | ||
| operations is currently unspecified. | ||
| =end pod |