How to get message time in Erlang?
I want to calculate something according to the frequency of received messages in gen_server.
eg. message 1, for a while, message 2 for a while. get time between messages.
thank
You can use statistics(wall_clock)every time you receive a message. The second member of the tuple that he returns will be the time between two receptions (in milliseconds).
statistics(wall_clock)
Edit
, now(), . supervisor.erl, $ERL_TOP/lib/stdlib/src/ Erlang/OTP. ( addRestart, inPeriod difference) now().
now()
supervisor.erl
$ERL_TOP/lib/stdlib/src/
addRestart
inPeriod
difference
Source: https://habr.com/ru/post/1776979/More articles:How to use the AND OR operator in sleep mode - hibernatespring проверка с помощью @valid где/как пользовательские сообщения об ошибках - springRails 3, mysql / mysql2 misinterprets some extracted rows as ASCII-8BIT - mysql[Sleep mode] Merging a temporary object with children - javamysql2 gem, Rails 3.0.3 and "incompatible character encodings" - mysqlFolding by case class - scalaSortedSet with INotifyPropertyChanged - c #spring local data - springWhich PE viewer application do you prefer when working with Win32 libraries? - c #load a library of downloadable code from a library? - phpAll Articles