Update waitSync and the TIMEOUT_IGNORED constant to use signed integers.