Create a simple timer to count seconds, minutes and hours

后端 未结 4 914
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-07 15:47

I\'m trying to create a pretty simple program that basically is a timer. I have three sets of labels, lbl_seconds, lbl_minutes and lbl_hours

4条回答
  •  执念已碎
    2021-01-07 16:03

    Use one timer and in event sub change value of your labels.

    You need one timer and three counter for seconds, minutes and hours.

    Count minutes, then modulo minutes / 60, if return 0 then start count minutes.
    Modulo minutes/60, if return 0 then start count hours.

提交回复
热议问题