I'm using time elapsed as a variable in a program which I am currently debugging. As I am debugging this the time elapsed variable still increases whilst I am examining variables giving undesired results and makes debugging ineffective. Is there anyway to freeze time or stop the variable from changing? (I am using System.currentTimeMillis()
to calculate the time).
Edit:
I have an object in a space that moves as time increases, because I am using System.currentTimeMillis()
to calculate how much time has passed, it doesn't work in debugging. I'd like to know if there is a way I can work around this, thanks.