I want to use the property currentPlaybackTime, which returns a double value to trigger a series of if statements at certain points throughout the movie's playback to pause it. Because of the approximate behavior of doubles, it never syncs up with the value in my if statement, and the movie doesn't stop. I can't use a range though because when I resume playing, it might still be within the range an immediately pause again.
SO I think what I need to do is round this double value to 2 decimal places.
But how do I observe each change to the currentPlaybackTime property? Right now I have a timer set to call the method checking my if statements against the playback time every .0333 seconds(approx 30 times a second(my movies framerate)). However this is inexact and I feel almost certainly wrong.