jarrodhroberson
2/14/2014 - 3:21 AM

How to get a timestamp in milliseconds from Erlang

How to get a timestamp in milliseconds from Erlang

% gets a timestamp in ms from the epoch
get_timestamp() ->
    {Mega,Sec,Micro} = erlang:now(),
    (Mega*1000000+Sec)*1000000+Micro.