No this wouldn't prevent a while loop locking mIRC. The timer would trigger, sending a message to mIRC telling it to execute the timer's code, but mIRC wouldn't process that message until the while loop had ended and the remainder of the script was executed.