Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #33 from basho/rdb-no-more-now

Use os:timestamp over locky erlang:now
  • Loading branch information...
commit 8d29970ea36b4e6eafd5f25e17f563c3cbd09a05 2 parents b6ab57c + 808b90f
@joewilliams joewilliams authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/folsom_metrics_duration.erl
  2. +2 −2 src/folsom_utils.erl
View
4 src/folsom_metrics_duration.erl
@@ -45,10 +45,10 @@ new(Name) ->
ets:insert(?DURATION_TABLE, Dur).
update(Name, timer_start) ->
- StartTime = erlang:now(),
+ StartTime = os:timestamp(),
ets:update_element(?DURATION_TABLE, Name, {3, StartTime});
update(Name, timer_end) ->
- EndTime = erlang:now(),
+ EndTime = os:timestamp(),
case ets:lookup_element(?DURATION_TABLE, Name, 3) of
undefined ->
ok;
View
4 src/folsom_utils.erl
@@ -41,11 +41,11 @@ convert_tags(Tags) ->
[to_atom(Tag) || Tag <- Tags].
now_epoch() ->
- {Mega, Sec, _} = erlang:now(),
+ {Mega, Sec, _} = os:timestamp(),
(Mega * 1000000 + Sec).
now_epoch_micro() ->
- {Mega, Sec, Micro} = erlang:now(),
+ {Mega, Sec, Micro} = os:timestamp(),
(Mega * 1000000 + Sec) * 1000000 + Micro.
get_ets_size(Tab) ->
Please sign in to comment.
Something went wrong with that request. Please try again.