time icon indicating copy to clipboard operation
time copied to clipboard

Add comparison to chrono to the docs

Open matklad opened this issue 4 years ago • 2 comments

Hey! As someone who is not familiar with the domain, I am having a hard time deciding whether I should use chrono or time-rs. It would help a lot if the docs explained what’s the difference between the two:)

matklad avatar Jan 24 '21 09:01 matklad

This can definitely be done at some point. I am biased, of course, but can try to provide a list of pros and cons of each.

Just off the top of my head (I'm on mobile), chrono has a significantly lower MSRV if that is of concern to you; time guarantees six months' compatibility. Time, however, has macros to generate statically known values in addition to having just about everything be const fn within compiler limitations. Time 0.3 will also have significantly different parsing and formatting (the latter of which is complete).

Like I said, though, I'll try and give a better overview at some point. Timing it up with the upcoming v0.3 release seems reasonable; parsing and saturating arithmetic (maybe, I have conflicting thoughts) are the only major points left before an alpha release.

jhpratt avatar Jan 24 '21 10:01 jhpratt

Definitely time Chrono is unreasonably complex while time makes the same thing intuitive for mortals

chandanch avatar Aug 22 '23 09:08 chandanch