-module(wait). -export([wait/0,wait/1]). wait() -> wait(1000). wait(N) -> receive some_message -> io:format( "~n got some_message ~n", []); another_message -> io:format( "~n got another_message ~n", []) after N -> io:format( "~n got timeOut ~n", []) end.