void clock()
//可调时钟
{
unsigned char num;
init_timer0();
while(1)
{
num = keyscan();
switch(num)
{
case 1: hour++;if(hour == 24)hour = 0;
break;
case 2: hour--;if(hour == 255)hour = 23;
break;
case 3:minute++;if(minute == 60)minute = 0;
break;
case 4:minute--;if(minute == 255) minute = 59;
break;
default:break;
}
if(updatetimerflag == 1)
{
{
unsigned char num;
init_timer0();
while(1)
{
num = keyscan();
switch(num)
{
case 1: hour++;if(hour == 24)hour = 0;
break;
case 2: hour--;if(hour == 255)hour = 23;
break;
case 3:minute++;if(minute == 60)minute = 0;
break;
case 4:minute--;if(minute == 255) minute = 59;
break;
default:break;
}
if(updatetimerflag == 1)
{