spaulaus / paass

Pixie Acquisition and Analysis Software Suite - maintained by Project Science
GNU General Public License v3.0
0 stars 2 forks source link

Change clocks to std::chrono #60

Open spaulaus opened 6 years ago

spaulaus commented 6 years ago

On 2015-11-28 17:51:50 @ksmith0 created this issue by saying: Robert reported an issue with the terminal timeout in pacman mode not responding. It was tracked down to the time comparison in CTerminal.cpp

if (currentTime > (commandRequestTime + commandTimeout_)) {
...
}

I suggest we change all clocks to std::chrono to provide more cross system support and unify our timing methods.

spaulaus commented 6 years ago

On 2015-11-30 14:41:48 @ksmith0 said: Support for chrono was added in gcc 4.4 (https://gcc.gnu.org/gcc-4.4/changes.html) which is our minimum version at the moment.

spaulaus commented 6 years ago

On 2015-12-01 16:45:56 @cthornsb said: Changed to std::chrono::steady_clock in commit d607d0a. I couldn't find any other time variables which were used for anything other than getting the current time and date.

spaulaus commented 6 years ago

On 2015-12-01 17:20:29 @ksmith0 said: We use timers in the statshandler and in poll2 to keep track of the run duration. We should also add a timer to deal with issue spaulaus/paass-lc#21 (Polling frequency).

Also, we need to abstract the run file class and use that to track run duration etc, but this is a problem for another issue.

spaulaus commented 6 years ago

On 2015-12-02 18:50:32 @spaulaus said: This, unfortunately, does not work on grpc02. (gcc 4.4.4)

/root/PixieSuite2/Core/source/CTerminal.cpp:42: error: ‘steady_clock’ in namespace ‘std::chrono’ does not name a type
spaulaus commented 6 years ago

On 2015-12-02 19:46:50 @cthornsb said: Changed std::chrono::steady_clock to ::system_clock in commit c1b297a. The code now compiles on grpc02.

spaulaus commented 6 years ago

On 2016-08-18 00:50:41 @ksmith0 said: @cthornsb Have we changed over all the clocks?

spaulaus commented 6 years ago

There are still a lot of clocks that don't use chrono. Marking this as a Kaizen task.