Tokenized man
Tokenized man

Reputation: 11

CTime initialization

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 displayed on a cstatic label by the way.

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

Thank you.

Upvotes: 0

Views: 753

Answers (1)

ravenspoint
ravenspoint

Reputation: 20586

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.

Upvotes: 1

Related Questions