now_to_secs
This commit is contained in:
parent
2ff78d7fc6
commit
34fc0fb157
|
@ -30,7 +30,8 @@
|
||||||
|
|
||||||
-export([apply_module_attributes/1,
|
-export([apply_module_attributes/1,
|
||||||
all_module_attributes/1,
|
all_module_attributes/1,
|
||||||
cancel_timer/1]).
|
cancel_timer/1,
|
||||||
|
now_to_secs/0, now_to_secs/1]).
|
||||||
|
|
||||||
-export([integer_to_binary/1]).
|
-export([integer_to_binary/1]).
|
||||||
|
|
||||||
|
@ -90,4 +91,9 @@ cancel_timer(Ref) ->
|
||||||
integer_to_binary(I) when is_integer(I) ->
|
integer_to_binary(I) when is_integer(I) ->
|
||||||
list_to_binary(integer_to_list(I)).
|
list_to_binary(integer_to_list(I)).
|
||||||
|
|
||||||
|
now_to_secs() ->
|
||||||
|
now_to_secs(os:timestamp()).
|
||||||
|
|
||||||
|
now_to_secs({MegaSecs, Secs, _MicroSecs}) ->
|
||||||
|
MegaSecs * 1000000 + Secs.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue