My First Crate (Chroniker)


#1

Hey! So I just finished my first crate chroniker. I was wondering if people could give it a quick review. Also is this the right place to ask this?

Thanks in Advance!


#2

How does it compare to chrono? That might be good thing to add to the README.


#3

Thanks for the advice! This project started from this post on stack overflow about getting the millisecond time in rust. As a result of seeing that post I made chroniker so that someone could simply get the computers time and change it to any other time unit (nanoseconds, minutes, hours, etc.). I haven’t used chrono much but from a quick glance it looked kind of verbose for somethings (like getting the current time in ms). It seemed like chrono was really a Date library where you could get the time whereas I wanted a time library. (BTW please correct me if I am wrong and there is a simple way to get the computer time other than adding the second and nanosecond times) :grinning:


#4

I think it is more like time


#5

The time units are untyped: You could get the time in milliseconds and use it as a time in days. Please see https://research.mozilla.org/2014/06/23/static-checking-of-units-in-servo/ for more about this. It is a blog post about size, but also applies to time.

Apart from that it looks good.


#6

Ok, I will take a look! Thanks!