2024-08-25 04:08:24 +00:00
|
|
|
#include <QElapsedTimer>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qelapsedtimer.h"
|
|
|
|
#include "gen_qelapsedtimer.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QElapsedTimer* QElapsedTimer_new() {
|
|
|
|
return new QElapsedTimer();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
uintptr_t QElapsedTimer_ClockType() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QElapsedTimer::ClockType _ret = QElapsedTimer::clockType();
|
|
|
|
return static_cast<uintptr_t>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
bool QElapsedTimer_IsMonotonic() {
|
|
|
|
return QElapsedTimer::isMonotonic();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QElapsedTimer_Start(QElapsedTimer* self) {
|
|
|
|
self->start();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
long long QElapsedTimer_Restart(QElapsedTimer* self) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return self->restart();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QElapsedTimer_Invalidate(QElapsedTimer* self) {
|
|
|
|
self->invalidate();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QElapsedTimer_IsValid(const QElapsedTimer* self) {
|
|
|
|
return self->isValid();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QElapsedTimer_NsecsElapsed(const QElapsedTimer* self) {
|
|
|
|
return self->nsecsElapsed();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QElapsedTimer_Elapsed(const QElapsedTimer* self) {
|
|
|
|
return self->elapsed();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QElapsedTimer_HasExpired(const QElapsedTimer* self, long long timeout) {
|
|
|
|
return self->hasExpired(static_cast<qint64>(timeout));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QElapsedTimer_MsecsSinceReference(const QElapsedTimer* self) {
|
|
|
|
return self->msecsSinceReference();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QElapsedTimer_MsecsTo(const QElapsedTimer* self, QElapsedTimer* other) {
|
|
|
|
return self->msecsTo(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QElapsedTimer_SecsTo(const QElapsedTimer* self, QElapsedTimer* other) {
|
|
|
|
return self->secsTo(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QElapsedTimer_OperatorEqual(const QElapsedTimer* self, QElapsedTimer* other) {
|
|
|
|
return self->operator==(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QElapsedTimer_OperatorNotEqual(const QElapsedTimer* self, QElapsedTimer* other) {
|
|
|
|
return self->operator!=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QElapsedTimer_Delete(QElapsedTimer* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|