#ifndef TIMEUPDATETHREAD_H
#define TIMEUPDATETHREAD_H

#include <QDateTime>
#include <QString>
#include <QThread>
#include <QTimer>

class TimeUpdateThread : public QThread {
    Q_OBJECT
   public:
    explicit TimeUpdateThread(QObject *parent = nullptr);
    ~TimeUpdateThread();
    void stop();

   signals:
    void timeUpdated(const QString &timeString);

   protected:
    void run() override;

   private:
    QTimer *timer;
    bool isStopped;
};

#endif  // TIMEUPDATETHREAD_H
