initial copy-pasta of callback-timer.js code from old repo.