     end
   end
 
+  defp now(), do: :os.system_time :milli_seconds
+  #defp now(), do: :erlang.monotonic_time :milli_seconds
+
   defp index(bin, ch) do
     case :binary.match(bin, <<ch>>) do
       :nomatch -> -1

  """
  def readln(pid, timeout \\ @to) do
    Agent.get_and_update(pid, fn {nid, buf} ->
      now = :erlang.monotonic_time :milli_seconds
      ch = 10;
      index = index(buf, ch)
      size = byte_size(buf)

        case data do
          <<>> ->
            :timer.sleep @sleep
            now = now()
            case now > dl do
              true -> {:to, all(iol), <<>>}
              false -> read_n(nid, iol, size, count, dl)
