delay可以同時設兩個變數嗎? |
已收到,感謝 |
時鐘程式給您參考如果您是在台中 是可以一起來研究 unsigned char timer_hour,timer_minute,timer_second; void second_proc(void) { timer_second++ ; //max. state 23:59:59 if(timer_second >= 60) { timer_second = 0; timer_minute++ ; if(timer_minute >= 60) { timer_minute = 0 ; timer_hour++ ; if(timer_hour >= 24) { timer_hour = 0 ; } } } } |
小黑屋|手機版|Archiver|機器人論壇 from 2005.07
GMT+8, 2025-1-31 15:09 , Processed in 0.145989 second(s), 11 queries , Apc On.
Powered by Discuz! X3.2
© 2001-2013 Comsenz Inc.