diff --git a/include/emysql.hrl b/include/emysql.hrl index 1320289f..4a6a30f7 100644 --- a/include/emysql.hrl +++ b/include/emysql.hrl @@ -34,9 +34,9 @@ port :: number(), database :: string(), encoding :: utf8 | latin1 | {utf8, utf8_unicode_ci} | {utf8, utf8_general_ci}, - available=queue:new() :: queue(), - locked=gb_trees:empty() :: gb_tree(), - waiting=queue:new() :: queue(), + available=queue:new() :: queue:queue(), + locked=gb_trees:empty() :: gb_tree:tree(), + waiting=queue:new() :: queue:queue(), start_cmds=[] :: string(), conn_test_period=0 :: number(), connect_timeout=infinity :: number() | infinity, diff --git a/src/emysql.erl b/src/emysql.erl index a373de9a..40467869 100644 --- a/src/emysql.erl +++ b/src/emysql.erl @@ -669,7 +669,7 @@ result_type(#eof_packet{}) -> eof. -spec as_dict(Result) -> Dict when Result :: #result_packet{}, - Dict :: dict(). + Dict :: dict:dict(). as_dict(Res) -> emysql_conv:as_dict(Res). diff --git a/src/emysql_conn_mgr.erl b/src/emysql_conn_mgr.erl index b14a08d6..de33f34b 100644 --- a/src/emysql_conn_mgr.erl +++ b/src/emysql_conn_mgr.erl @@ -40,7 +40,7 @@ -include("emysql.hrl"). --record(state, {pools, lockers = dict:new() :: dict()}). +-record(state, {pools, lockers = dict:new() :: dict:dict()}). %%==================================================================== %% API @@ -419,7 +419,7 @@ lock_next_connection(Available ,Locked, Who) -> end. connection_locked_at(Conn, MonitorRef) -> - Conn#emysql_connection{locked_at=lists:nth(2, tuple_to_list(now())), + Conn#emysql_connection{locked_at=lists:nth(2, tuple_to_list(erlang:timestamp())), monitor_ref = MonitorRef}. serve_waiting_pids(Pool) ->