Use time crate.
Fixed some warnings.