summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/benchmarkinfo.cpp
authormickeyl <mickeyl>2004-02-27 19:39:59 (UTC)
committer mickeyl <mickeyl>2004-02-27 19:39:59 (UTC)
commite2b37546627e0959c14920d751275377b13739a5 (patch) (unidiff)
treeb2bc189227928f93c5194348d39a48a29e4f7f05 /noncore/settings/sysinfo/benchmarkinfo.cpp
parent069a15dcec8054ce2d8436a2961bd05cf2fffcd5 (diff)
downloadopie-e2b37546627e0959c14920d751275377b13739a5.zip
opie-e2b37546627e0959c14920d751275377b13739a5.tar.gz
opie-e2b37546627e0959c14920d751275377b13739a5.tar.bz2
the integer test now is the official dhrystone benchmark
that makes it easier to compare results
Diffstat (limited to 'noncore/settings/sysinfo/benchmarkinfo.cpp') (more/less context) (show 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
@@ -34,21 +34,23 @@
34#include <qclipboard.h> 34#include <qclipboard.h>
35#include <qtimer.h> 35#include <qtimer.h>
36#include <qcolor.h> 36#include <qcolor.h>
37#include <qpushbutton.h> 37#include <qpushbutton.h>
38 38
39/* STD */ 39/* STD */
40#include <stdio.h>
41#include <time.h> 40#include <time.h>
41#include <stdio.h>
42#include <stdlib.h> 42#include <stdlib.h>
43#include <math.h>
43 44
44#include "benchmarkinfo.h" 45#include "benchmarkinfo.h"
45 46
46extern "C" 47extern "C"
47{ 48{
48 void BenchFFT( void ); 49 void BenchFFT( void );
50 double dhry_main( int );
49} 51}
50 52
51//=========================================================================== 53//===========================================================================
52 54
53class BenchmarkPaintWidget : public QWidget 55class BenchmarkPaintWidget : public QWidget
54{ 56{
@@ -119,15 +121,14 @@ void BenchmarkInfo::run()
119 startButton->setText( "> Don't touch! Running Tests! Don't touch! <" ); 121 startButton->setText( "> Don't touch! Running Tests! Don't touch! <" );
120 qApp->processEvents(); 122 qApp->processEvents();
121 QTime t; 123 QTime t;
122 124
123 if ( test_alu->isOn() ) 125 if ( test_alu->isOn() )
124 { 126 {
125 t.start(); 127 int d = round( dhry_main( DHRYSTONE_RUNS ) );
126 benchInteger(); 128 test_alu->setText( 1, QString( "%1 DHRYS" ).arg( QString::number( d ) ) );
127 test_alu->setText( 1, QString( "%1 secs" ).arg( QString::number( t.elapsed() / 1000.0 ) ) );
128 test_alu->setOn( false ); 129 test_alu->setOn( false );
129 } 130 }
130 131
131 if ( test_fpu->isOn() ) 132 if ( test_fpu->isOn() )
132 { 133 {
133 t.start(); 134 t.start();