rm reg_name/2, seed_now/0 functions

This commit is contained in:
Feng 2016-02-11 15:53:23 +08:00
parent 89052d8e6e
commit 44d598fd87
1 changed files with 0 additions and 15 deletions

View File

@ -14,16 +14,11 @@
%% limitations under the License. %% limitations under the License.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% @doc emqttd main module.
%% @author Feng Lee <feng@emqtt.io>
-module(emqttd). -module(emqttd).
-export([start/0, env/1, env/2, start_listeners/0, stop_listeners/0, -export([start/0, env/1, env/2, start_listeners/0, stop_listeners/0,
load_all_mods/0, is_mod_enabled/1, is_running/1]). load_all_mods/0, is_mod_enabled/1, is_running/1]).
%% Utility functions.
-export([reg_name/2, seed_now/0]).
-define(MQTT_SOCKOPTS, [ -define(MQTT_SOCKOPTS, [
binary, binary,
{packet, raw}, {packet, raw},
@ -105,13 +100,3 @@ is_running(Node) ->
Pid when is_pid(Pid) -> true Pid when is_pid(Pid) -> true
end. end.
-spec reg_name(module(), pos_integer()) -> atom().
reg_name(M, Id) when is_atom(M), is_integer(Id) ->
list_to_atom(lists:concat([M, "_", Id])).
seed_now() ->
case erlang:function_exported(erlang, timestamp, 0) of
true -> random:seed(erlang:timestamp()); %% R18
false -> random:seed(os:timestamp()) %% compress 'now()' warning...
end.