Created
May 7, 2013 12:01
-
-
Save DimitryDushkin/5532071 to your computer and use it in GitHub Desktop.
Erlang get current time in milliseconds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-spec get_timestamp() -> integer(). | |
get_timestamp() -> | |
{Mega, Sec, Micro} = os:timestamp(), | |
(Mega*1000000 + Sec)*1000 + round(Micro/1000). |
Thanks @joakimk . :erlang.system_time / 1.0e6 |> round
works to get the millis
there is Erlang function to get timestamp in ms :os.system_time(:millisecond)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks