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

        case data do
          <<>> ->
            :timer.sleep @sleep
            now = :erlang.monotonic_time :milli_seconds
            case now > dl do
              true -> {:to, all(iol), <<>>}
              false -> read_ch(nid, iol, -1, size, ch, dl)

    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
