Some questions about wxStopWatch

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
User avatar
Parduz
I live to help wx-kind
I live to help wx-kind
Posts: 188
Joined: Fri Jan 30, 2015 1:48 pm
Location: Bologna, Italy

Some questions about wxStopWatch

Post by Parduz »

  1. How can i know if a wxStopWatch is paused or running?
  2. Why m_elapsedBeforePause and m_pauseCount are all private (or there's no methods to access them)?
  3. Same question about GetClockFreq and GetCurrentClockValue?
If they were at least protected i could use them in a derived class, but as they are i can't really access anything.
There a reasoning beyond this that i don't catch?

Thanks
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Some questions about wxStopWatch

Post by PB »

You need to ask the developers in the wx-users mailing list.

But they may suggest to use the C++11 chrono instead. wxStopWatch may be one of those classes introduced back when the GUI libraries tried (and often had to) be an all-purpose Swiss army knife.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Some questions about wxStopWatch

Post by ONEEYEMAN »

Hi,
Some of those questions really belong to wx-users ML, where you can talk to wx core dev team.

This is user forum - for users by users of the library.

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Some questions about wxStopWatch

Post by doublemax »

Parduz wrote: Wed Mar 31, 2021 1:38 pm
  1. How can i know if a wxStopWatch is paused or running?
  2. Why m_elapsedBeforePause and m_pauseCount are all private (or there's no methods to access them)?
  3. Same question about GetClockFreq and GetCurrentClockValue?
Just out of curiousity: Why would you need this information? It seems you're trying to use the class to retrieve some system settings and not for its intended purpose, the measuring of time intervals.
Use the source, Luke!
User avatar
Parduz
I live to help wx-kind
I live to help wx-kind
Posts: 188
Joined: Fri Jan 30, 2015 1:48 pm
Location: Bologna, Italy

Re: Some questions about wxStopWatch

Post by Parduz »

doublemax wrote: Wed Mar 31, 2021 7:09 pm
Parduz wrote: Wed Mar 31, 2021 1:38 pm
  1. How can i know if a wxStopWatch is paused or running?
  2. Why m_elapsedBeforePause and m_pauseCount are all private (or there's no methods to access them)?
  3. Same question about GetClockFreq and GetCurrentClockValue?
Just out of curiousity: Why would you need this information? It seems you're trying to use the class to retrieve some system settings and not for its intended purpose, the measuring of time intervals.
'cause i have a number of them and i could use the paused/running state to know what part of my program started and how much it tooks to end, and it could be done out of the part i want to measure. These data are already in memory (pauseCount, m_elapsedBeforePause) and i don't see why i should create "copies" of them. asked about GetClockFreq and GetCurrentClockValue just 'cause i looked at the declaration and (to me) they could follow the same logic.
Post Reply