Update test.js

        var min = Math.floor(time / 60);
        var sec = time - min * 60;
        var hour = Math.floor(time / 3600);
        time = time - hours * 3600;