code: @Override
      public IPromise timeoutIn(long millis) {
          final Actor actor = Actor.sender.get();
          if ( actor != null )
              actor.delayed(millis, ()-> timedOut(Timeout.INSTANCE));
          else {
              Actors.delayedCalls.schedule( new TimerTask() {
                  @Override
                  public void run() {
                      timedOut(Timeout.INSTANCE);
                  }
              },millis);
          }
          return this;
      }
docs: see IPromise (inheriting Callback) interface