2024-08-25 04:08:24 +00:00
|
|
|
#include <QElapsedTimer>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qelapsedtimer.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qelapsedtimer.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QElapsedTimer* QElapsedTimer_new() {
|
|
|
|
return new QElapsedTimer();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QElapsedTimer_ClockType() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QElapsedTimer::ClockType _ret = QElapsedTimer::clockType();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_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-09-18 00:12:02 +00:00
|
|
|
qint64 _ret = self->restart();
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qint64 _ret = self->nsecsElapsed();
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
long long QElapsedTimer_Elapsed(const QElapsedTimer* self) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qint64 _ret = self->elapsed();
|
|
|
|
return static_cast<long long>(_ret);
|
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) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qint64 _ret = self->msecsSinceReference();
|
|
|
|
return static_cast<long long>(_ret);
|
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) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qint64 _ret = self->msecsTo(*other);
|
|
|
|
return static_cast<long long>(_ret);
|
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) {
|
2024-09-18 00:12:02 +00:00
|
|
|
qint64 _ret = self->secsTo(*other);
|
|
|
|
return static_cast<long long>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QElapsedTimer_OperatorEqual(const QElapsedTimer* self, QElapsedTimer* other) {
|
2024-11-22 06:06:01 +00:00
|
|
|
return (*self == *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) {
|
2024-11-22 06:06:01 +00:00
|
|
|
return (*self != *other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|