News for hackers. Stuff that matters.
Re:Please put units in names by devmunchies on Monday March 21, 2022 @12:13AM (#30750170)
That’s similar to Crystal. All numbers have built in methods to convert them to a Time::Span object. So I could have a function that takes a Time::Span instead of an Int, like:

    def sleep(num : Time::Span)
      # do something here
    end
I would call it like:

    sleep 300.seconds

There are no comments on this comment yet.