Stride Forums Archive

Getting the elapsed time since application load

3 posts, 1948 views, 2015-04-29 to 2015-05-01

Faerdan (Mark Aherne) 2015-04-29 #1

[Edit]Apologies, I forgot about the Answers section, I searched there and found my answer. Thanks.[/Edit]

Hi there,

I have tried to find the answer to this in the documentation and source code, to no avail.

What is the best method of getting the elapsed time since the application was started?

Thanks,

Mark

Toaster 2015-04-30 #2

I think you can use game.PlayTime.

However there is also game.UpdateTime and game.DrawTime.

Not sure exactly what the difference is, but I think PlayTime would be the total elapsed time since the application was started if you were to judge it by it’s name. Maybe a dev can verify this?

Faerdan (Mark Aherne) 2015-05-01 #3 in reply to #2

Thanks for the info.

I believe that game.UpdateTime.Total is the time elapsed since the application started. This is from the answer I found in the Answers section of the site.