summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/benchmarkinfo.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/sysinfo/benchmarkinfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp
index 62146f7..1d0b140 100644
--- a/noncore/settings/sysinfo/benchmarkinfo.cpp
+++ b/noncore/settings/sysinfo/benchmarkinfo.cpp
@@ -28,33 +28,35 @@
#include <qfiledialog.h>
#include <qlabel.h>
#include <qpainter.h>
#include <qdirectpainter_qws.h>
#include <qapplication.h>
#include <qpushbutton.h>
#include <qclipboard.h>
#include <qtimer.h>
#include <qcolor.h>
#include <qpushbutton.h>
/* STD */
-#include <stdio.h>
#include <time.h>
+#include <stdio.h>
#include <stdlib.h>
+#include <math.h>
#include "benchmarkinfo.h"
extern "C"
{
void BenchFFT( void );
+ double dhry_main( int );
}
//===========================================================================
class BenchmarkPaintWidget : public QWidget
{
public:
BenchmarkPaintWidget() : QWidget( 0, "Benchmark Paint Widget", WStyle_Customize|WStyle_StaysOnTop|WPaintUnclipped|WPaintClever )
{
resize( QApplication::desktop()->size() );
show();
p.begin( this );
@@ -113,27 +115,26 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
BenchmarkInfo::~BenchmarkInfo()
{}
void BenchmarkInfo::run()
{
startButton->setText( "> Don't touch! Running Tests! Don't touch! <" );
qApp->processEvents();
QTime t;
if ( test_alu->isOn() )
{
- t.start();
- benchInteger();
- test_alu->setText( 1, QString( "%1 secs" ).arg( QString::number( t.elapsed() / 1000.0 ) ) );
+ int d = round( dhry_main( DHRYSTONE_RUNS ) );
+ test_alu->setText( 1, QString( "%1 DHRYS" ).arg( QString::number( d ) ) );
test_alu->setOn( false );
}
if ( test_fpu->isOn() )
{
t.start();
BenchFFT();
test_fpu->setText( 1, QString( "%1 secs" ).arg( QString::number( t.elapsed() / 1000.0 ) ) );
test_fpu->setOn( false );
}
if ( test_txt->isOn() )