summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/benchmarkinfo.cpp
Unidiff
Diffstat (limited to 'noncore/settings/sysinfo/benchmarkinfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp
index 3c2c15f..2a52b00 100644
--- a/noncore/settings/sysinfo/benchmarkinfo.cpp
+++ b/noncore/settings/sysinfo/benchmarkinfo.cpp
@@ -51,7 +51,10 @@
51extern double round(double); 51extern double round(double);
52#endif 52#endif
53 53
54using namespace Opie::Ui;
55using namespace Opie::Core;
54extern "C" 56extern "C"
57
55{ 58{
56 void BenchFFT( void ); 59 void BenchFFT( void );
57 double dhry_main( int ); 60 double dhry_main( int );
@@ -175,12 +178,12 @@ void BenchmarkInfo::machineActivated( int index )
175 } 178 }
176 QStringList::Iterator it = results->begin(); 179 QStringList::Iterator it = results->begin();
177 test_alu->setText( 2, *(it++) ); 180 test_alu->setText( 2, *(it++) );
178 test_fpu->setText( 2, *(it++) ); 181 test_fpu->setText( 2, *(it++) );
179 test_txt->setText( 2, *(it++) ); 182 test_txt->setText( 2, *(it++) );
180 test_gfx->setText( 2, *(it++) ); 183 test_gfx->setText( 2, *(it++) );
181 test_ram->setText( 2, *(it++) ); 184 test_ram->setText( 2, *(it++) );
182 test_sd->setText( 2, *(it++) ); 185 test_sd->setText( 2, *(it++) );
183 test_cf->setText( 2, *(it++) ); 186 test_cf->setText( 2, *(it++) );
184} 187}
185 188
186 189
@@ -259,7 +262,7 @@ int BenchmarkInfo::textRendering( int seconds )
259 BenchmarkPaintWidget bpw; 262 BenchmarkPaintWidget bpw;
260 263
261 int loops = 0; 264 int loops = 0;
262 265
263 while ( t.elapsed() < stop ) 266 while ( t.elapsed() < stop )
264 { 267 {
265 int k = rand() % 9; 268 int k = rand() % 9;
@@ -269,7 +272,7 @@ int BenchmarkInfo::textRendering( int seconds )
269 bpw.p.drawText( rand() % w, rand() % h, text, text.length() ); 272 bpw.p.drawText( rand() % w, rand() % h, text, text.length() );
270 ++loops; 273 ++loops;
271 } 274 }
272 275
273 return loops * text.length(); 276 return loops * text.length();
274} 277}
275 278
@@ -290,7 +293,7 @@ int BenchmarkInfo::gfxRendering( int seconds )
290 t.start(); 293 t.start();
291 int stop = t.elapsed() + seconds*1000; 294 int stop = t.elapsed() + seconds*1000;
292 int loops = 0; 295 int loops = 0;
293 296
294 while ( t.elapsed() < stop ) 297 while ( t.elapsed() < stop )
295 { 298 {
296 int k = rand() % 9; 299 int k = rand() % 9;
@@ -301,7 +304,7 @@ int BenchmarkInfo::gfxRendering( int seconds )
301 304
302 t.restart(); 305 t.restart();
303 stop = t.elapsed() + seconds*1000; 306 stop = t.elapsed() + seconds*1000;
304 307
305 while ( t.elapsed() < stop ) 308 while ( t.elapsed() < stop )
306 { 309 {
307 int k = rand() % 9; 310 int k = rand() % 9;
@@ -314,7 +317,7 @@ int BenchmarkInfo::gfxRendering( int seconds )
314 br1.setStyle( SolidPattern ); 317 br1.setStyle( SolidPattern );
315 t.restart(); 318 t.restart();
316 stop = t.elapsed() + seconds*1000; 319 stop = t.elapsed() + seconds*1000;
317 320
318 while ( t.elapsed() < stop ) 321 while ( t.elapsed() < stop )
319 { 322 {
320 int k = rand() % 9; 323 int k = rand() % 9;
@@ -326,7 +329,7 @@ int BenchmarkInfo::gfxRendering( int seconds )
326 QPixmap p = Resource::loadPixmap( "sysinfo/pattern" ); 329 QPixmap p = Resource::loadPixmap( "sysinfo/pattern" );
327 t.restart(); 330 t.restart();
328 stop = t.elapsed() + seconds*1000; 331 stop = t.elapsed() + seconds*1000;
329 332
330 while ( t.elapsed() < stop ) 333 while ( t.elapsed() < stop )
331 { 334 {
332 bpw.p.drawPixmap( rand()%w, rand()%h, p ); 335 bpw.p.drawPixmap( rand()%w, rand()%h, p );
@@ -334,7 +337,7 @@ int BenchmarkInfo::gfxRendering( int seconds )
334 } 337 }
335 338
336 return loops; 339 return loops;
337 340
338} 341}
339 342
340void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item ) 343void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item )