miqt/qt/gen_qelapsedtimer.cpp

82 lines
2.0 KiB
C++
Raw Normal View History

#include <QElapsedTimer>
#include <qelapsedtimer.h>
2024-08-29 07:01:51 +00:00
#include "gen_qelapsedtimer.h"
#include "_cgo_export.h"
2024-11-19 06:29:06 +00:00
void QElapsedTimer_new(QElapsedTimer** outptr_QElapsedTimer) {
QElapsedTimer* ret = new QElapsedTimer();
*outptr_QElapsedTimer = ret;
}
int QElapsedTimer_ClockType() {
QElapsedTimer::ClockType _ret = QElapsedTimer::clockType();
return static_cast<int>(_ret);
2024-08-29 07:01:51 +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) {
qint64 _ret = self->restart();
return static_cast<long long>(_ret);
}
void QElapsedTimer_Invalidate(QElapsedTimer* self) {
self->invalidate();
}
bool QElapsedTimer_IsValid(const QElapsedTimer* self) {
return self->isValid();
}
long long QElapsedTimer_NsecsElapsed(const QElapsedTimer* self) {
qint64 _ret = self->nsecsElapsed();
return static_cast<long long>(_ret);
}
long long QElapsedTimer_Elapsed(const QElapsedTimer* self) {
qint64 _ret = self->elapsed();
return static_cast<long long>(_ret);
}
bool QElapsedTimer_HasExpired(const QElapsedTimer* self, long long timeout) {
return self->hasExpired(static_cast<qint64>(timeout));
}
long long QElapsedTimer_MsecsSinceReference(const QElapsedTimer* self) {
qint64 _ret = self->msecsSinceReference();
return static_cast<long long>(_ret);
}
long long QElapsedTimer_MsecsTo(const QElapsedTimer* self, QElapsedTimer* other) {
qint64 _ret = self->msecsTo(*other);
return static_cast<long long>(_ret);
}
long long QElapsedTimer_SecsTo(const QElapsedTimer* self, QElapsedTimer* other) {
qint64 _ret = self->secsTo(*other);
return static_cast<long long>(_ret);
}
bool QElapsedTimer_OperatorEqual(const QElapsedTimer* self, QElapsedTimer* other) {
return (*self == *other);
}
bool QElapsedTimer_OperatorNotEqual(const QElapsedTimer* self, QElapsedTimer* other) {
return (*self != *other);
}
2024-11-19 06:29:06 +00:00
void QElapsedTimer_Delete(QElapsedTimer* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QElapsedTimer*>( self );
} else {
delete self;
}
}