Adjust unit time to 100 ms and refactor