myFunction1(state, message){
if(state) action1;
if(message) action2;
work every 0.5 sec
if(err) throw e;
}
myFunction2(state, message){
blah blah
works every 0.3 sec
if(err) throw e;
}
How to make function1 work every 0.5 sec and function2 work every 0.3 sec?
Is there just one way that use for loop?