diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-05-27 18:35:01 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-05-27 18:35:01 +0200 |
| commit | 4d1f3264dc4b4ddc211164712e0d2d654a913bb7 (patch) | |
| tree | 30655ea8f740eaf115a06c2ebfaaad29a7bcb39e /testDrm/TestCrow.cs | |
| parent | 8d385b053423c16e18d02467bdd54be17c3b42aa (diff) | |
c native GraphicObject implementation, work in progressTestKMS
Diffstat (limited to 'testDrm/TestCrow.cs')
| -rw-r--r-- | testDrm/TestCrow.cs | 22 |
1 files changed, 19 insertions, 3 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(); |