diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2010-11-05 10:46:44 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2010-11-05 10:46:44 +0000 |
| commit | d0167cb3a51a1d5935e388bae3c49c69d3ecd9ee (patch) | |
| tree | 7cbb8a39fa692806fcdac451629af1dec0b2ca3e /src | |
| parent | 02baf503d3404fac02321a0d5ce7b1040036c584 (diff) | |
| download | rabbitmq-server-git-d0167cb3a51a1d5935e388bae3c49c69d3ecd9ee.tar.gz | |
Add now_ms/0.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_misc.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl index 086d260e24..afcdae7728 100644 --- a/src/rabbit_misc.erl +++ b/src/rabbit_misc.erl @@ -64,6 +64,7 @@ -export([recursive_delete/1, dict_cons/3, orddict_cons/3, unlink_and_capture_exit/1]). -export([get_options/2]). +-export([now_ms/0]). -import(mnesia). -import(lists). @@ -184,6 +185,7 @@ -spec(unlink_and_capture_exit/1 :: (pid()) -> 'ok'). -spec(get_options/2 :: ([optdef()], [string()]) -> {[string()], [{string(), any()}]}). +-spec(now_ms/0 :: () -> integer()). -endif. @@ -721,3 +723,6 @@ get_flag(K, [Nk | As]) -> {[Nk | As1], V}; get_flag(_, []) -> {[], false}. + +now_ms() -> + timer:now_diff(now(), {0,0,0}) div 1000. |
