Adding optional maxDelayTime parameter into internal_createDelay

Without this, all delay times default to a max of 1 second.