diff options
-rw-r--r-- | game.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -303,7 +303,7 @@ function preloadSounds() { var lastSoundStampMap = {}; function playSound(name) { - var now = new Date(); + var now = performance.now(); console.log("playSound(\"" + name + "\")"); if (lastSoundStampMap[name] == null || now - lastSoundStampMap[name] >= 500) { soundMap[name].play(); |