I want to check if an int
value is higher than 20 for a certain amount of 15 minutes, if that int
value stays higher than 20 in those 15 minutes, code will executed
I didn't understand the difference between a Handler
and a Runnable
, how to use them, What do they do...
My question is:
How can I run an if statement
for a certain time using a Runnable/Handler
This is the if statement which I want to be checked for 15 mins,
if(Speed > 20){
// Code that will run after 15 mins IF the speed is higher than 20 for all that time
}