Unix timestamp to seconds in javascript
<p>I'm trying to do a program which executes after 15 minutes of being in the page. My problem is how to get the exact number to add on the timestamp which is stored in a cookie.<br>
I need a function to convert seconds into timestamps or anything that can make the action execute after 15 minutes. I don't really know how much time is 1792939 which I place in the code below.</p>

<pre><code>setInterval("timer()",1000);



    $.cookie("tymz", time);

    function timer(){
        var d = new Date();
        var time = d.getTime();

        var x = Number($.cookie("tymz")) + 1792939;

        //alert('Cookie time: ' + x + '\nTime: ' + time);


        if(time &gt; x){
            alert('times up');
        }else{
            //alert('not yet\n' + 'times up: ' + x + '\ntime: ' + time);
        }

    }
</code></pre>
