provider_time
Stable type · Other
Tier: stable · Kind: type · Topic: Other
| Python | Julia | Rust |
|---|---|---|
TimeLike | not exported | ProviderTime |
Python
TimeLike = Union[_dt.datetime, float, int]
A time a provider takes: a datetime.datetime (an instant; naive is
UTC), or a number of seconds from the provider’s time_origin (the Unix
epoch when it has none), spec/esm-sources.md §4.
Julia
Julia does not export this type.
Rust
pub enum ProviderTime {
Instant(OffsetDateTime),
Seconds(f64),
}
A time a Provider
takes (spec/esm-sources.md §4): an instant, or a
number of seconds from the loader’s time_origin
(the Unix epoch when it has none). OffsetDateTime and f64 convert into
it, so p.sample_at(t) takes either.