diff options
author | lbsa71 | 2007-10-30 09:05:31 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-30 09:05:31 +0000 |
commit | 67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch) | |
tree | 20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs | |
parent | * Deleted .user file (diff) | |
download | opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2 opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz |
* Optimized usings
* Shortened type references
* Removed redundant 'this' qualifier
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs | 25 |
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 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Diagnostics; |
31 | using System.Text; | ||
32 | using OpenSim.Region.Environment.Scenes; | ||
33 | using libsecondlife; | 31 | using libsecondlife; |
34 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
35 | using System.Timers; | 33 | using OpenSim.Region.Environment.Scenes; |
36 | using System.Diagnostics; | ||
37 | 34 | ||
38 | namespace SimpleApp | 35 | namespace 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 |