windows-time (0.100.0+paring.1)
Published 2026-10-14 03:21:30 +09:00 by paring
Installation
[registries.forgejo]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = truecargo add windows-time@0.100.0+paring.1 --registry forgejoAbout this package
Windows time types
windows-time
The windows-time crate provides Windows TimeSpan and
DateTime values with Rust constructors, arithmetic, and std::time conversions.
TimeSpan is a duration and DateTime is a point in time. Both use 100-nanosecond ticks.
Start by adding the following to your Cargo.toml file:
[dependencies.windows-time]
version = "0.100"
Use the time types as needed:
use windows_time::*;
let span = TimeSpan::from_minutes(90);
assert_eq!(span.whole_seconds(), 5400);
let start = DateTime::from_unix_secs(1_000_000_000);
let later = start.checked_add(span).unwrap();
assert_eq!(later.unix_secs(), 1_000_005_400);
Dependencies
| ID | Version |
|---|---|
| windows-core | ^0.100.0 |
Details
2026-10-14 03:21:30 +09:00
2026-11-15 19:56:41 +09:00
Assets (1)
Versions (1)
View all
Cargo
21
MIT OR Apache-2.0
12 KiB
0.100.0+paring.1
2026-10-14