Add Delay() function, unit is ms.