anchor.diff:                  n :: integer(),
                   interval = 0 :: non_neg_integer(),  %%ms
                   delay_between_executions = 0 :: non_neg_integer(),  %%ms
  -                schedule = [] :: [fun(()-> any())],
  -                schedule_reversed = [] :: [fun(()-> any())]}).
  +                schedule = [] :: [pid()],
  +                schedule_reversed = [] :: [pid()]}).
   
   %%------------------------------------------------------------------------------
   %% Exported functions
  
positive.code: maybe_run_fn(State) ->
      State.
  
  run_fn(#state{schedule = [Fn | T], delay_between_executions = Delay, interval = Interval} = State) ->
      Self = self(),
      spawn(fun() -> run_and_wait(Fn, Interval), Self ! increase_n end),
      erlang:send_after(Delay, self(), delay_between_executions),
      State#state{schedule = T}.
  
  run_and_wait(Fn, Interval) ->
      {TimeUs, _} = timer:tc(Fn),
      Time = erlang:convert_time_unit(TimeUs, microsecond, millisecond),
      case Interval - Time of
          SleepTime when SleepTime > 0 -> timer:sleep(SleepTime);
          _ -> ok
      end.
  
  timeout(State) ->
  
negative.code: 
  -spec run(pid(), fun(()-> any())) -> ok.
  run(Pid, Fun) ->
      RunnerPid = spawn(fun() -> async_runner(Fun) end),
      gen_server:cast(Pid, {schedule, RunnerPid}).
  
  -spec update(pid(), non_neg_integer(), pos_integer()) -> ok.
  update(Pid, Interval, Rate) ->
  