mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-04 17:15:23 -06:00
.benchmarks
git-svn-id: svn://ultimatepp.org/upp/trunk@12487 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
575deb9c32
commit
88757bbd66
5 changed files with 80 additions and 6 deletions
|
|
@ -57,7 +57,7 @@ void App::Print()
|
|||
void App::Benchmark()
|
||||
{
|
||||
double tm[2];
|
||||
ImageBuffer ib(1024, 768);
|
||||
ImageBuffer ib(2000, 2000);
|
||||
for(int pass = 0; pass < 1 + !!ctrl.mt; pass++) {
|
||||
int time0 = GetTickCount();
|
||||
int n = 0;
|
||||
|
|
@ -67,7 +67,9 @@ void App::Benchmark()
|
|||
time = GetTickCount();
|
||||
if(time - time0 > 1000) break;
|
||||
sw.Co(pass);
|
||||
sw.Begin();
|
||||
DoPaint(sw);
|
||||
sw.End();
|
||||
n++;
|
||||
}
|
||||
tm[pass] = double(time - time0) / n;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue