#define u8DAY ((unsigned char)0)
#define u8NIGHT ((unsigned char)1)
unsigned char u8DayStatus;
void main (void)
{
while(1)
{
while(u8DayStatus == u8DAY)
{
static unsinged long u32CodingCounter;
u32CodingCounter++;
}
u32CodingCounter=0;
while(u8DayStatus == u8NIGHT)
{
static unsinged long u32SleepingCounter;
u32CodingCounter++;
}
u32SleepingCounter=0;
}
}