adnanademovic / rosrust

Pure Rust implementation of a ROS client library
MIT License
730 stars 75 forks source link

Add more conversions between Time/Duration and `std` types, and add `Time::now()`. #172

Closed de-vri-es closed 2 years ago

de-vri-es commented 2 years ago

This PR implements conversion from Duration to std::time::Duration, conversions between Time and std::time::SystemTime, and adds Time::now() to get the current time.

It also adds unit tests for the new conversions.

de-vri-es commented 2 years ago

Processed your feedback :)

Feel free to squash and merge for a clean history, if you like.

/edit: Forgot to push, pushed now ^^

de-vri-es commented 2 years ago

Fixed the tests :)