2024-08-25 04:08:24 +00:00
|
|
|
#include <QElapsedTimer>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qelapsedtimer.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qelapsedtimer.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
|
|
}
|
|
|
|
|
|
|
|
QElapsedTimer* QElapsedTimer_new() {
|
|
|
|
return new QElapsedTimer();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
uintptr_t QElapsedTimer_ClockType() {
|
|
|
|
QElapsedTimer::ClockType ret = QElapsedTimer::clockType();
|
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QElapsedTimer_IsValid(QElapsedTimer* self) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QElapsedTimer*>(self)->isValid();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
long long QElapsedTimer_NsecsElapsed(QElapsedTimer* self) {
|
|
|
|
return const_cast<const QElapsedTimer*>(self)->nsecsElapsed();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
long long QElapsedTimer_Elapsed(QElapsedTimer* self) {
|
|
|
|
return const_cast<const QElapsedTimer*>(self)->elapsed();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
bool QElapsedTimer_HasExpired(QElapsedTimer* self, long long timeout) {
|
|
|
|
return const_cast<const QElapsedTimer*>(self)->hasExpired(static_cast<qint64>(timeout));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
long long QElapsedTimer_MsecsSinceReference(QElapsedTimer* self) {
|
|
|
|
return const_cast<const QElapsedTimer*>(self)->msecsSinceReference();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
long long QElapsedTimer_MsecsTo(QElapsedTimer* self, QElapsedTimer* other) {
|
|
|
|
return const_cast<const QElapsedTimer*>(self)->msecsTo(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
long long QElapsedTimer_SecsTo(QElapsedTimer* self, QElapsedTimer* other) {
|
|
|
|
return const_cast<const QElapsedTimer*>(self)->secsTo(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QElapsedTimer_OperatorEqual(QElapsedTimer* self, QElapsedTimer* other) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QElapsedTimer*>(self)->operator==(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QElapsedTimer_OperatorNotEqual(QElapsedTimer* self, QElapsedTimer* other) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return const_cast<const QElapsedTimer*>(self)->operator!=(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QElapsedTimer_Delete(QElapsedTimer* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|