From ee3bad44c72329d61a2cb0c4064c22512451372d Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Tue, 25 Aug 2020 12:48:09 +0300 Subject: Implement clock pausing Implement clock setting w/o starting or stopping Both of these should make it possible for the server to start/stop/pause/resume the clock with perfect synchronization to the true time. --- include/aoclocklabel.h | 2 +- include/courtroom.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/aoclocklabel.h b/include/aoclocklabel.h index 806ed182..b948330c 100644 --- a/include/aoclocklabel.h +++ b/include/aoclocklabel.h @@ -14,8 +14,8 @@ public: AOClockLabel(QWidget *parent); void start(); void start(int msecs); + void set(int msecs, bool update_text=false); void pause(); - void resume(); void stop(); protected: diff --git a/include/courtroom.h b/include/courtroom.h index 93461726..15324a0e 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -251,8 +251,11 @@ public: void check_connection_received(); + void start_clock(); void start_clock(qint64 msecs); + void set_clock(qint64 msecs); + void stop_clock(); qint64 get_ping() { return ping_timer.elapsed(); } -- cgit