[erlang-questions] signal arrival time
Ulf Wiger
ulf@REDACTED
Wed May 2 11:52:06 CEST 2012
Another way to do it is to use DTrace (not yet officially supported)
http://www.erlang-factory.com/conference/ErlangUserConference2011/speakers/ScottLystigFritchie
BR,
Ulf W
On 2 May 2012, at 11:40, Joe Armstrong wrote:
> Yes - read the manual pages for the BIF erlang:trace. You basically
> set up a trace process
> that watches the process you are interested in, then you ask the
> system to send you timestamp
> information for each message that is received.
>
> This is described at http://www.erlang.org/doc/man/erlang.html#trace-3
>
> Alternatively you could you fold something like this into your code:
>
>
> loop() ->
> receive
> {ts, Time, Pattern1} ->
> ...
> {ts, Time, Pattern2} ->
> ...
> Any ->
> self() ! {ts, erlang:now(), Any},
> loop()
> end.
>
> /Joe
>
>
> On Wed, May 2, 2012 at 5:24 AM, József Bérces
> <jozsef.berces@REDACTED> wrote:
>> Is there a way to tell the time when a signal arrived to the process
>> mailbox?
>>
>> Thanks,
>> Jozsef
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
http://feuerlabs.com
More information about the erlang-questions
mailing list