Warning: Neckbeard nerd talk ahead!
Here's what I do in the Mac app;
When a track starts/stream starts, i save aside the current unix time (seconds since whenever).
I have a timer set up to fire every half second or so. In this timer, i get the current unix time, subtract the saved aside one, and get the current duration since that first value.
This means that the "current duration" to be displayed is accurate irregardless of any lag or holdups that the UI/System might throw your way.
Then it's just a simple matter of taking the duration, doing a little bit of math, and you get a pretty time display to print.
int mins = (int) ((float)trackDuration/60.0);
int secs = (int) trackDuration - (60 * mins);
It's not 100% accurate, but no one will notice.