-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1114: Add `epochCeiling` function to `Primitive.Types`. r=jonathanknowles a=jonathanknowles # Issue Number #1086 # Overview This PR: - [x] Adds the functions `epoch{Ceiling,Floor}` - `epochCeiling` calculates the _earliest_ `EpochNo` whose start time is _greater than or equal to_ the specified time. (Required by issue #1086.) - `epochFloor` calculates the _latest_ `EpochNo` whose start time is _less than or equal to_ the specified time. (Added for completeness.) - [x] Adds the `epochStartTime` and `epoch{Pred,Succ}` helper functions. - [x] Adds a set of property tests for the above. # Comments The functions added by this PR follow the same general pattern as the following existing functions: * `slot{Ceiling,Floor}` * `slot{Pred,Succ}` * `slotStartTime` Co-authored-by: Jonathan Knowles <[email protected]>
- Loading branch information
Showing
3 changed files
with
319 additions
and
18 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
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
Oops, something went wrong.