Is there any way to know how many seconds does it take a loop to execute in java?
For example:
for(int i=0; i < 1000000; i++) {
//Do some difficult task goes in here
}
It does not have to be accurate 100%, but its just to have an idea of how long it could take. The algorithm inside is some kind of key generator that writes to a .txt file. I expect it to take even a few mins, so for my first test i want to count the seconds.