Does erlang record when a process started?

前端 未结 3 1553
予麋鹿
予麋鹿 2021-01-18 09:22

I\'m working with monitoring an Erlang application and I\'m currently trying to determine how long a specific PID has been running. Absolute timestamp or duration would wor

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-18 09:42

    I was looking in toolbar:start(). the process monitor and don't look time alive or time init, but it is easy to make. In dictionary of process you can save a value when init and that this process can respond to other process about this value.

    For read value in dictionary process you can use get/1 and for save use put/2 (first key and second value).

    Respond to other process about this value is same that others responses, etc.

提交回复
热议问题