aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs
parent* Deleted .user file (diff)
downloadopensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs25
1 files changed, 11 insertions, 14 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs b/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs
index 0f833ea..cbc4dea 100644
--- a/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs
+++ b/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs
@@ -27,37 +27,34 @@
27*/ 27*/
28 28
29using System; 29using System;
30using System.Collections.Generic; 30using System.Diagnostics;
31using System.Text;
32using OpenSim.Region.Environment.Scenes;
33using libsecondlife; 31using libsecondlife;
34using OpenSim.Framework; 32using OpenSim.Framework;
35using System.Timers; 33using OpenSim.Region.Environment.Scenes;
36using System.Diagnostics;
37 34
38namespace SimpleApp 35namespace SimpleApp
39{ 36{
40 public class CpuCounterObject : SceneObjectGroup 37 public class CpuCounterObject : SceneObjectGroup
41 { 38 {
42 private PerformanceCounter m_counter; 39 private PerformanceCounter m_counter;
43 40
44 public CpuCounterObject(Scene world, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos ) 41 public CpuCounterObject(Scene world, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos)
45 : base(world, regionHandle, ownerID, localID, pos, BoxShape.Default ) 42 : base(world, regionHandle, ownerID, localID, pos, BoxShape.Default)
46 { 43 {
47 String objectName = "Processor"; 44 String objectName = "Processor";
48 String counterName = "% Processor Time"; 45 String counterName = "% Processor Time";
49 String instanceName = "_Total"; 46 String instanceName = "_Total";
50 47
51 m_counter = new PerformanceCounter(objectName, counterName, instanceName); 48 m_counter = new PerformanceCounter(objectName, counterName, instanceName);
52 } 49 }
53 50
54 public override void UpdateMovement( ) 51 public override void UpdateMovement()
55 { 52 {
56 float cpu = m_counter.NextValue() / 40f; 53 float cpu = m_counter.NextValue()/40f;
57 LLVector3 size = new LLVector3(cpu, cpu, cpu); 54 LLVector3 size = new LLVector3(cpu, cpu, cpu);
58 //rootPrimitive.ResizeGoup( size ); 55 //rootPrimitive.ResizeGoup( size );
59 56
60 base.UpdateMovement(); 57 base.UpdateMovement();
61 } 58 }
62 } 59 }
63} 60} \ No newline at end of file