added time delay functions to duel.js