Elixir has :timer.sleep(ms)
, a function which allows you to pause a process’s execution for an
arbitrary number of milliseconds.
We can implement the same using messages and a timeout in the following ways.
1 | defmodule SleepTimeout do |
You may ask, what is the frigging point of all of this when we have :timer.sleep
?
Well, there is no point. This was just a fun little exercise :D
I am currently working on LiveForm which makes
setting up contact forms on your website a breeze.