How to capture two time values into variables?

I need to capture two time values for comparison. I can not use .Net.I must enter the start and end values into two variables to perform an operation. How to proceed in this case. I thank the attention.

Set first time then make coroutine or invokerepeating every second or how precise your measurment have to be and stop counting that time when needed then set second time. so coroutine or invokerepeating should make counting of passed time

What do you mean by you can’t use .NET? Do you mean you want to do this in Javascript?

This API page has info about getting the time since app start from Unity - you can see the code in either C# or JS: Unity - Scripting API: Time.time

1 Like