beet_core 0.0.8

Core utilities and types for other beet crates
1
2
3
4
5
6
7
8
9
use extend::ext;
use std::time::Duration;

#[ext]
pub impl Duration {
	fn from_hms(hour: u64, minute: u64, second: u64) -> Duration {
		Duration::from_secs(hour * 3600 + minute * 60 + second)
	}
}