How to get time difference in milliseconds
<p>I can't wrap my brain around this one so I hope someone can help. I have a song track that has the song length in milliseconds. I also have the date the song played in DATETIME format. What I am trying to do is find out how many milliseconds is left in the song play time.</p>

<p>Example</p>

<pre><code>$tracktime = 219238;  
$dateplayed = '2011-01-17 11:01:44';  
$starttime = strtotime($dateplayed);
</code></pre>

<p>I am using the following to determine time left but it does not seem correct.</p>

<pre><code>$curtime = time();   
$timeleft = $starttime+round($tracktime/1000)-$curtime;  
</code></pre>

<p>Any help would be greatly appreciated.</p>
