How do I keep the exact time into a current playing song as a variable

For my game, the music only plays when you’re moving, and when you move backwards, the game plays a reverse variant of the current song, which is the exact same song but reversed and some layers added, how would I keep track of the current timestamp so the game plays the reverse variant at the right timestamp?