Update timer.js

Updated usage without API