aboutsummaryrefslogtreecommitdiffstatsci
path: root/testDrm
diff options
context:
space:
mode:
Diffstat (limited to 'testDrm')
-rw-r--r--testDrm/TestCrow.cs22
-rw-r--r--testDrm/testDrm.csproj4
-rwxr-xr-xtestDrm/ui/2.crow2
3 files changed, 22 insertions, 6 deletions
diff --git a/testDrm/TestCrow.cs b/testDrm/TestCrow.cs
index cfacae83..3eaa2656 100644
--- a/testDrm/TestCrow.cs
+++ b/testDrm/TestCrow.cs
@@ -26,6 +26,7 @@
using System;
using Crow;
using System.Runtime.InteropServices;
+using System.Diagnostics;
namespace testDrm
{
@@ -43,10 +44,25 @@ namespace testDrm
unsafe static Rectangle* rect;
unsafe static void Main(){
+ const int count = 10000;
rect = allocate();
- update (150, 160);
- Console.WriteLine (rect->Height);
- rect->Height = 200;
+ Console.WriteLine ("function update");
+ Stopwatch sw = Stopwatch.StartNew ();
+ for (int i = 0; i < count; i++) {
+ update (150, 160);
+ }
+ sw.Stop ();
+ Console.WriteLine ("{0} updates in {1} ticks and {2} ms", count, sw.ElapsedTicks, sw.ElapsedMilliseconds);
+
+ Console.WriteLine ("field update");
+ sw.Restart ();
+ for (int i = 0; i < count; i++) {
+ rect->Height = 200;
+ rect->Width = 250;
+ }
+ sw.Stop ();
+ Console.WriteLine ("{0} updates in {1} ticks and {2} ms", count, sw.ElapsedTicks, sw.ElapsedMilliseconds);
+
Console.WriteLine (rect->Height);
// Rectangle bounds = new Rectangle(0,0,1024,768);
// Interface iface = new Interface();
diff --git a/testDrm/testDrm.csproj b/testDrm/testDrm.csproj
index 27db51e6..2cf19157 100644
--- a/testDrm/testDrm.csproj
+++ b/testDrm/testDrm.csproj
@@ -19,13 +19,13 @@
<Command type="Execute" command="${TargetName}" workingdir="${SolutionDir}/build/${ProjectConfigName}" />
</CustomCommands>
</CustomCommands>
- <StartupObject>testDrm.TestCrow</StartupObject>
+ <StartupObject>testDrm.TestApp</StartupObject>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
- <DefineConstants>DEBUG;</DefineConstants>
+ <DefineConstants>DEBUG;MEASURE_TIME</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
diff --git a/testDrm/ui/2.crow b/testDrm/ui/2.crow
index a56d079d..bad2daae 100755
--- a/testDrm/ui/2.crow
+++ b/testDrm/ui/2.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<Window Caption="Performances" Height="160" Width="200" CornerRadius="5">
+<Window Caption="Performances" Height="160" Width="200" CornerRadius="5" MinimumSize="50,50">
<VerticalStack Width="90%" Height="Fit" Spacing="1" Margin="10">
<HorizontalStack>
<Label Text="Frame:" Style="FpsLabel"/>