2024-08-25 16:08:24 +12:00
|
|
|
#include <QElapsedTimer>
|
2024-10-16 18:07:56 +13:00
|
|
|
#include <qelapsedtimer.h>
|
2024-08-29 19:01:51 +12:00
|
|
|
#include "gen_qelapsedtimer.h"
|
2024-12-11 19:55:47 +13:00
|
|
|
|
2025-01-07 11:30:33 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern C */
|
2024-12-11 19:55:47 +13:00
|
|
|
#endif
|
2024-08-25 16:08:24 +12:00
|
|
|
|
2024-12-07 17:15:57 +13:00
|
|
|
QElapsedTimer* QElapsedTimer_new() {
|
|
|
|
return new QElapsedTimer();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
int QElapsedTimer_clockType() {
|
2024-09-15 10:29:05 +12:00
|
|
|
QElapsedTimer::ClockType _ret = QElapsedTimer::clockType();
|
2024-09-18 12:12:02 +12:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 19:01:51 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
bool QElapsedTimer_isMonotonic() {
|
2024-08-25 16:08:24 +12:00
|
|
|
return QElapsedTimer::isMonotonic();
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QElapsedTimer_start(QElapsedTimer* self) {
|
2024-08-25 16:08:24 +12:00
|
|
|
self->start();
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
long long QElapsedTimer_restart(QElapsedTimer* self) {
|
2024-09-18 12:12:02 +12:00
|
|
|
qint64 _ret = self->restart();
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QElapsedTimer_invalidate(QElapsedTimer* self) {
|
2024-08-25 16:08:24 +12:00
|
|
|
self->invalidate();
|
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
bool QElapsedTimer_isValid(const QElapsedTimer* self) {
|
2024-09-11 17:41:09 +12:00
|
|
|
return self->isValid();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
long long QElapsedTimer_nsecsElapsed(const QElapsedTimer* self) {
|
2024-09-18 12:12:02 +12:00
|
|
|
qint64 _ret = self->nsecsElapsed();
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
long long QElapsedTimer_elapsed(const QElapsedTimer* self) {
|
2024-09-18 12:12:02 +12:00
|
|
|
qint64 _ret = self->elapsed();
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
bool QElapsedTimer_hasExpired(const QElapsedTimer* self, long long timeout) {
|
2024-09-11 17:41:09 +12:00
|
|
|
return self->hasExpired(static_cast<qint64>(timeout));
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
long long QElapsedTimer_msecsSinceReference(const QElapsedTimer* self) {
|
2024-09-18 12:12:02 +12:00
|
|
|
qint64 _ret = self->msecsSinceReference();
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
long long QElapsedTimer_msecsTo(const QElapsedTimer* self, QElapsedTimer* other) {
|
2024-09-18 12:12:02 +12:00
|
|
|
qint64 _ret = self->msecsTo(*other);
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
long long QElapsedTimer_secsTo(const QElapsedTimer* self, QElapsedTimer* other) {
|
2024-09-18 12:12:02 +12:00
|
|
|
qint64 _ret = self->secsTo(*other);
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
bool QElapsedTimer_operatorEqual(const QElapsedTimer* self, QElapsedTimer* other) {
|
2024-11-22 19:06:01 +13:00
|
|
|
return (*self == *other);
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
bool QElapsedTimer_operatorNotEqual(const QElapsedTimer* self, QElapsedTimer* other) {
|
2024-11-22 19:06:01 +13:00
|
|
|
return (*self != *other);
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2025-02-01 13:45:16 +13:00
|
|
|
void QElapsedTimer_delete(QElapsedTimer* self) {
|
2025-01-18 17:42:41 +13:00
|
|
|
delete self;
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|