anchor.diff:      ?INTERVAL_TAB = ets:new(?INTERVAL_TAB, [named_table,protected]),
       {ok, [], infinity}.
   
  +-spec ensure_started() -> 'ok'.
   ensure_started() ->
       case whereis(timer_server) of
   	undefined -> 
  
positive.code: %%
  %% Time is in milliseconds.
  %%
  -opaque tref()    :: any().
  -type time()      :: non_neg_integer().
  -type timestamp() :: {non_neg_integer(), non_neg_integer(), non_neg_integer()}.
  
  %%
  %% Interface functions
  %%
  -spec apply_after(time(), atom(), atom(), [_]) -> {'ok', tref()} | {'error', _}.
  apply_after(Time, M, F, A) ->
      req(apply_after, {Time, {M, F, A}}).
  
  -spec send_after(time(), pid() | atom(), term()) -> {'ok', tref()} | {'error', _}.
  send_after(Time, Pid, Message) ->
      req(apply_after, {Time, {?MODULE, send, [Pid, Message]}}).
  
  -spec send_after(time(), _) -> {'ok', tref()} | {'error', _}.
  send_after(Time, Message) ->
      send_after(Time, self(), Message).
  
  -spec exit_after(time(), pid() | atom(), _) -> {'ok', tref()} | {'error', _}.
  exit_after(Time, Pid, Reason) ->
      req(apply_after, {Time, {erlang, exit, [Pid, Reason]}}).
  
  -spec exit_after(time(), term()) -> {'ok', tref()} | {'error', _}.
  exit_after(Time, Reason) ->
      exit_after(Time, self(), Reason).
  
  -spec kill_after(time(), pid() | atom()) -> {'ok', tref()} | {'error', _}.
  kill_after(Time, Pid) ->
      exit_after(Time, Pid, kill).
  
  -spec kill_after(time()) -> {'ok', tref()} | {'error', _}.
  kill_after(Time) ->
      exit_after(Time, self(), kill).
  
  -spec apply_interval(time(), atom(), atom(), [_]) -> {'ok', tref()} | {'error', _}.
  apply_interval(Time, M, F, A) ->
      req(apply_interval, {Time, self(), {M, F, A}}).
  
  -spec send_interval(time(), pid() | atom(), term()) -> {'ok', tref()} | {'error', _}.
  send_interval(Time, Pid, Message) ->
      req(apply_interval, {Time, Pid, {?MODULE, send, [Pid, Message]}}).
  
  -spec send_interval(time(), term()) -> {'ok', tref()} | {'error', _}.
  send_interval(Time, Message) ->
      send_interval(Time, self(), Message).
  
  -spec cancel(tref()) -> {'ok', 'cancel'} | {'error', _}.
  cancel(BRef) ->
      req(cancel, BRef).
  
  
negative.code: 		     [{'==','$1',Pid}],
  		     ['$_']}]),
      lists:foreach(fun({IntKey, TimerKey, _ }) ->
  			  ets:delete(?INTERVAL_TAB, IntKey),
  			  ets:delete(?TIMER_TAB, TimerKey)
  		  end, IntervalTimerList).
  
  %% Calculate time to the next timeout. Returned timeout must fit in a 
  %% small int.
  
  -spec next_timeout() -> timeout().
  next_timeout() ->
      case ets:first(?TIMER_TAB) of
  	'$end_of_table' -> 
  