updated main.js to use high resolution timer.