srevish
Member level 2
- Joined
- Apr 23, 2013
- Messages
- 48
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,661
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 if(time<=2) function(); else if(time>2 && time<30) function1(); else if(time==30) //----------------------- problem in this time { function1(); if(dew_input) {dew_flag=0;} else {dew_flag=1;} } else if(time>=31 && time<=120) function2(); else if(time>121 && time<150) function3(); else if(time==150) { function3(); if(dew_input) {dew_flag=0;} else {dew_flag=1;} } else if(time>151 && time<=240 ) function4();
For the above IF loop i am having problem when the time is equal to 30.
The program is working well for sometimes, even more then a weak but suddenly it is getting problem.
The problem is when time is equal to 30, the program misses its operation and jumps to next step. When I restarts the system then it again starts to work function normally, but after some time I am getting this problem.
Can any one tell me how to solve this problem and why these types of problem occurs.
thanks