mirror of https://github.com/Treeki/WindEmu.git
add ms timestamps to WindQt log
This commit is contained in:
parent
607c194eb6
commit
c70ea2828b
|
@ -13,8 +13,10 @@ MainWindow::MainWindow(EmuBase *emu, QWidget *parent) :
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->logView->setMaximumBlockCount(1000);
|
ui->logView->setMaximumBlockCount(1000);
|
||||||
|
|
||||||
|
elapsedTimer.start();
|
||||||
emu->setLogger([&](const char *str) {
|
emu->setLogger([&](const char *str) {
|
||||||
ui->logView->appendPlainText(str);
|
QString fullStr = QStringLiteral("[%1] %2").arg(elapsedTimer.elapsed()).arg(str);
|
||||||
|
ui->logView->appendPlainText(fullStr);
|
||||||
});
|
});
|
||||||
|
|
||||||
timer = new QTimer(this);
|
timer = new QTimer(this);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define MAINWINDOW_H
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
|
#include <QElapsedTimer>
|
||||||
#include "../WindCore/emubase.h"
|
#include "../WindCore/emubase.h"
|
||||||
#include "pdascreenwindow.h"
|
#include "pdascreenwindow.h"
|
||||||
|
|
||||||
|
@ -44,6 +45,7 @@ private slots:
|
||||||
void on_writeDwordButton_clicked();
|
void on_writeDwordButton_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QElapsedTimer elapsedTimer;
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
PDAScreenWindow pdaScreen;
|
PDAScreenWindow pdaScreen;
|
||||||
EmuBase *emu;
|
EmuBase *emu;
|
||||||
|
|
Loading…
Reference in New Issue