开发者

CTime initialization

开发者 https://www.devze.com 2023-03-23 08:29 出处:网络
I would like to initialize my CTime object to NULL. But it doesn\'t have such a constructor. What I mean is to initialize it to 00:00:00, then wait until my application fully loaded and a button is

I would like to initialize my CTime object to NULL.

But it doesn't have such a constructor.

What I mean is to initialize it to 00:00:00, then wait until my application fully loaded and a button is pressed to start a certain thread, it will count up automatically.

Also, it is dis开发者_StackOverflow社区played on a cstatic label by the way.

So, could someone offer a hint for me to move on ?

Thank you.


I think you may be looking for CTimeSpan. Construct one of them for the initial time, then construct a later one each time your counter fires. Subtract the earlier one from the later to get the time elapsed.

0

精彩评论

暂无评论...
验证码 换一张
取 消