有人能告诉我如何在给定时间后重置计时器吗?就像我正在尝试制作一个时钟,我希望它重置,然后重新开始(就像60分钟后,从0开始)。
让您的OnTimer
事件更新计时器的Tag
属性,或一个单独的变量,显示经过的时间,然后在该值达到阈值时重置计时器。
或者,你可以简单地运行一个单独的计时器,在你想要的时间间隔过去后触发一次,然后一起重置两个计时器。