Thursday, August 17, 2017

xna - What is the value of gameTime.ElapsedGameTime.TotalSeconds?


I was wondering what is exactly the value of gameTime.ElapsedGameTime.TotalSeconds in a second? Please explain it to me completely and as great as you can.



Answer



From the documentation ElapsedGameTime is:




Property Value


Elapsed game time since the last update.



This means it's the amount of time since the last time the update function was called. It's a TimeSpan. Getting TotalSeconds from a TimeSpan will give you the time in seconds. This is likely to be a pretty small value, since updates happen very fast.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...