Provides a timer for measuring lag.
More...
#include <IrcLagTimer>
- Note
- IrcLagTimer relies on functionality introduced in Qt 4.7.0, and is therefore not functional when built against earlier versions of Qt.
◆ IrcLagTimer()
IrcLagTimer::IrcLagTimer |
( |
QObject * | parent = nullptr | ) |
|
|
explicit |
Constructs a new lag timer with parent.
- Note
- If parent is an instance of IrcConnection, it will be automatically assigned to connection.
◆ ~IrcLagTimer()
IrcLagTimer::~IrcLagTimer |
( |
| ) |
|
|
override |
◆ connection()
This property holds the associated connection.
- Access functions:
- IrcConnection* connection() const
- void setConnection(IrcConnection* connection)
◆ interval()
int IrcLagTimer::interval |
( |
| ) |
const |
This property holds the lag measurement interval in seconds.
The default value is 60
seconds. A value equal to or less than 0
seconds disables the lag measurement.
- Access functions:
- int interval() const
- void setInterval(int seconds)
◆ lag()
qint64 IrcLagTimer::lag |
( |
| ) |
const |
This property holds the current lag in milliseconds.
The value is -1
when
- the connection is not connected,
- the lag has not yet been measured,
- the lag timer is disabled (interval <= 0s), or
- the Qt version is too old (4.7.0 or later is required).
- Access function:
-
- Notifier signal:
- void lagChanged(qint64 lag)
◆ lagChanged
void IrcLagTimer::lagChanged |
( |
qint64 | lag | ) |
|
|
signal |
This signal is emitted when the lag has changed.