I am trying to fire an action every 125ms.
To get the current milliseconds, I go this way:
double passedMs = GameTime.TotalGameTime.TotalMilliseconds;
//this is a double as well
currentMs += (currentMs - passedMs)
if (currentMs > 125)
{
//Action
currentMs = 0;
}
But the value I get in passedMs is not simply milliseconds, it's more like 8833.351
.
So what could I do here?