void (int commandId, int timeout, Runnable onTimeout) { synchronized (myLock) { myTimeoutHandlers.put(commandId, new TimeoutHandler(onTimeout, System.currentTimeMillis() + timeout)); } scheduleTimeoutCheck(); }