Created
June 30, 2016 16:49
-
-
Save niftynei/b1e6504c4913261d0b62c8937a4ff115 to your computer and use it in GitHub Desktop.
Handy Erlang One Liners
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Figure out how many messages there are in your mailbox | |
process_info(self(), message_queue_len). | |
% Register wall_clock & runtime | |
statistics(wall_clock), statistics(runtime). | |
% A function to check the next message in the mailbox | |
F = fun() -> receive X -> X after 0 -> no_message end end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment