Created
September 29, 2016 21:53
-
-
Save frenchbread/7284f24b0c224ee70b3c3ebd3cb1ef94 to your computer and use it in GitHub Desktop.
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). | |
tpl2str(Req) -> | |
Timestamp = get_timestamp(), | |
{_,[_,Method,Path|Rest]} = Req, | |
Bucket = [Timestamp,{Method,Path}], | |
lists:flatten(io_lib:format("~p", [Bucket])). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment