klingtnet / rosc

An OSC library for Rust.
Apache License 2.0
173 stars 25 forks source link

Add conversions between SystemTime and OscTime #14

Closed ooesili closed 3 years ago

ooesili commented 3 years ago

This changes OscTime from a type alias into a struct. This allows us to add implementations to OscTime, most notably conversions to and from std::time::SystemTime. This has obvious utility such as generating an OSC timestamp from the current time or some time relative to it.

This is unfortunately a breaking change for users of this crate. Conversions to and from (u8, u8) are provided to minimize the impact of this breakage for users.

Addresses issue #13