aboutsummaryrefslogtreecommitdiff
path: root/game.js
diff options
context:
space:
mode:
Diffstat (limited to 'game.js')
-rw-r--r--game.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/game.js b/game.js
index ee9da93..e34f4c2 100644
--- a/game.js
+++ b/game.js
@@ -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();