Move tpms to a global and use milliseconds for timer functions