     {:noreply, mark_call_error(state, fun_name, delta)}
   end
 
-  def register(fun_name, fun) do
-    GenServer.call(__MODULE__, {:register, fun_name, fun})
+  def register(fun_name, fun, threshold_config) do
+    GenServer.call(__MODULE__, {:register, fun_name, fun, threshold_config})
   end
 
   def run(fun_name, args \\ []) when is_list(args) do
     case get_runner(fun_name) do
       {:ok, run_fun} ->
-        start = get_time
+        start = get_time_msecs
         result = apply(run_fun, args)
-        delta = get_time - start
+        delta = get_time_msecs - start
 
         case result do
           :error -> track_error(fun_name, delta)

    {:ok, %{metrics: metrics, functions: %{}}}
  end

  def handle_call({:register, fun_name, fun}, _from, state) do
  end

  def handle_call({:run, fun_name}, _from, state) do

  end

  defp get_time do
    Timex.Time.now(:secs)
  end

  defp get_time_msecs do
    Timex.Time.now(:msecs)
  end

  defp get_runner(fun_name) do
