From 76677e5c0062707265aaf3d80c70d4aad7e25bd5 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 2 Dec 2022 22:15:51 +0100 Subject: [PATCH] pstats: Deprecate `PStatClient::resume_after_pause()` It creates a clock skew in the PStats timing information that cannot be corrected for in the server. If we want to bring this back, we should either have a global `pause()` and `resume()` (so we can properly pause collection in the meantime, and have a time to reset to, but we'd need to think about how to handle threading) or we should add a `drop_frame()` to drop the current frame. If we must bring it back in its current form, then we need to communicate the clock reset to the server, so that it can properly take it into account. --- panda/src/pstatclient/pStatClient.I | 2 ++ 1 file changed, 2 insertions(+) diff --git a/panda/src/pstatclient/pStatClient.I b/panda/src/pstatclient/pStatClient.I index e7daf8fa0e..2f5433d558 100644 --- a/panda/src/pstatclient/pStatClient.I +++ b/panda/src/pstatclient/pStatClient.I @@ -95,6 +95,8 @@ is_connected() { * Resumes the PStatClient after the simulation has been paused for a while. * This allows the stats to continue exactly where it left off, instead of * leaving a big gap that would represent a chug. + * + * @deprecated Do not use this, it creates inaccurate timing information. */ INLINE void PStatClient:: resume_after_pause() {