How do I write a timer in Erlang and how does it work?
For example, I'm trying to understand this code :
Function ({deliver_sm, Number, Time}) when Time == "Deliverd" ->
timer:sleep(600000),
#what happens when number and time comes here from another node. It's like a parent and child. I have received a submit request from one node and I have to delay the node where it will send a response which is this deliver sm.
I have tried using this timer sleep but the function is working fine without being put to sleep. Is there anyway to know that this sleep timer is working. For example can I possibly print the time when this timer gets triggered. Or Am I going in a wrong direction? Any suggestion is welcome and thank you