Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
For some of my foolish reasons and monotony, How do I create a half second delay before each recursion?
Pascal 是对的,但如果您不需要接收任何消息以提高可读性,请使用timer:sleep/1。这个函数的作用完全相同。
timer:sleep/1
使用接收块的 after 语句
wait_ms(X) when is_integer(X) -> receive after X -> done end.