package
0.0.0-20241219150934-9249a2757f07
Repository: https://github.com/smart-core-os/sc-golang.git
Documentation: pkg.go.dev

# Packages

Package clock contains the Clock interface, an abstraction over the functions in the standard time package.

# Functions

No description provided by the author
CompareAscending returns -1 if t1 is before t2, 1 if t1 is after t2 and 0 if t1 is equal to t2.
No description provided by the author
No description provided by the author
No description provided by the author
PeriodsConnected returns true if there exists a (possibly empty) Period that is enclosed by both p1 and p2 For example * `[2, 4)` and `[5, 7)` are not connected * `[2, 4)` and `[3, 5)` are connected, because both enclose `[3, 4)` * `[2, 4)` and `[4, 6)` are connected, because both enclose the empty period `[4, 4)`.
PeriodsIntersect returns true if there exists a non-empty Period that is enclosed by both p1 and p2 For example * `[2, 4)` and `[5, 7)` do not intersect * `[2, 4)` and `[3, 5)` intersect, because both enclose `[3, 4)` which is non-empty * `[2, 4)` and `[4, 6)` do not intersect, because both enclose the empty period `[4, 4)`.