method TimeOfDay.ofNanosOfDay
The time of day n nanoseconds after midnight.
Example:
use std.time { TimeOfDay }
fn main() io {
match TimeOfDay.ofNanosOfDay(3600000000000) {
TimeOfDay t => print(t.show())
InvalidValue _ => print("out of range")
}
}Output
01:00:00
pub(api) static fn ofNanosOfDay(n: i64) -> TimeOfDay | InvalidValueSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
n | i64 |
Returns
Errors
InvalidValue@error- `InvalidValue` when `n` is negative or not below one day.
Effects
none declared (pure unless the body says otherwise)
Defined in: std/time/time.oxl:1206