You say 10,000 but you write 1000, here is what I would do for 1000:
if (counter % 1000 == 0) {
//Do something.
}
For 10,000 do:
if (counter % 10000 == 0) {
//Do something.
}
solved ‘do something’ every time a counter increase of 1000 [closed]