Need help with my clock

I am currently in the process of developing a Flash application that counts down an hour. I have also created code to load in an MP3 playlist file and play designated MP3’s. I’d like my clock code to automatically play the next song on the playlist every 60 seconds. Currently, I am accomplishing this by utilizing the setInterval() function, however, this ends up coming out of sync with the timer that I have already made.

Does anyone know how I could build something into my clock code that would switch songs every 60 seconds? Any suggestions would be much appreciated! Below is my clock code along with the current function that I am using to switch songs. You’ll see at the bottom how I utilize the songSwap function to change songs.

function display()
{
millitime = getTimer()/60000-(int(getTimer()/60000));
seconds = 59-(int(millitime*60));
}

function songswap ()
{
if(_name eq “b_prev”)
{
_parent.playPrev();
}
else
{
_parent.playNext();
}
}

sectimer = setInterval(display,1000);
changesong = setInterval(songswap,60000);