crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.22k stars 1.61k forks source link

Add `Crystal::System::Time.ticks` #14620

Closed ysbaddaden closed 1 month ago

ysbaddaden commented 1 month ago

The first two commits are straightforward. They mostly do a bit of cleanup. Details are in the commit descriptions.

I'm not sure about the third one: it's meant for #14618 where I want the monotonic time as a basic integer, yet can't have it allocate memory (GC may not be initialized) and raising would be an issue (.monotonic may raise on ).