Umm ok let's see. If the process is at 5000 miliseconds, this would work. Asuimg the pctimz isn't used for anything special.
if(isinpest && pctimz >= 1)
pctimz -=1;
}
if(isinpest &&pctimz == 0)
sendMessage("You are currently in pest control");
pctimz == 10;
}