finished the high-resolution timer for lua