Javascript for "how many seconds have passed since this timestamp"
<p>Is there a Javascript equivalent for this PHP code?</p>

<pre><code>function secondsAgo($unixtime){
   return time() - $unixtime;
}
</code></pre>

<p>Example usage:</p>

<pre><code>echo secondsAgo(time()-10); // 10
</code></pre>

<p>I have a unixtimestamp in Javascript and need to find out how many seconds have passed from today until that timestamp.</p>
