The only time related function I tested working now is os.clock(), but with the code: Code: local time1 = os.time(); local delta = 1; while os.time() - time1 < delta do then end This is a busy wait and will freeze the game totally, while what I really want is just to pause the script for a certain time not the game. Reason is I am trying to use lua script to change unit attachments, for multiple member and multiple attachments need to change, I have to wait until the unit is refreshed in game after executing changing attachment function. Otherwise it will not find any member to run the function, or totally ignore the remaining attachments to be replaced. Also tried os.execute("ping -n "..delta.." localhost"); Seems Civ 6 doesn't like it and gives me nil warning. Any idea? @LeeS @Gedemon Thanks guys!