code: public void registerTimerService(String id, TimerService timerService) {   
          if (timerService instanceof GlobalTimerService) {
              ((GlobalTimerService) timerService).setTimerServiceId(id);
          }
          this.registeredServices.put(id, timerService);
      }
docs: Registers timerServie under given id. In case timer service is already registered
  with this id it will be overridden.
  @param id key used to get hold of the timer service instance
  @param timerService fully initialized TimerService instance