Today I Learned

hashrocket A Hashrocket project

Calculate hours, minutes, seconds in milliseconds

Erlang has timer module that makes it easy to calculate milliseconds in Elixir:

iex(1)> :timer.seconds(15)
15000
iex(2)> :timer.minutes(20)
1200000
iex(3)> :timer.hours(2)
7200000
See More #elixir TILs
Looking for help? At Hashrocket, we 💜 Elixir! From our many Elixir client projects, to sponsoring the Chicago Elixir Meetup, to the source code for this application, we are invested in this community. Contact us today to talk about your Elixir project.