diff options
author | lbsa71 | 2007-07-17 17:57:46 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-17 17:57:46 +0000 |
commit | fea3c20576d195609dac1276344ce9c5252140d7 (patch) | |
tree | db0042c594c49df7f8268f21acb0d8e271cbf32f /OpenSim/Region/Examples/SimpleApp/MySceneObject.cs | |
parent | change to floats where needed (diff) | |
download | opensim-SC-fea3c20576d195609dac1276344ce9c5252140d7.zip opensim-SC-fea3c20576d195609dac1276344ce9c5252140d7.tar.gz opensim-SC-fea3c20576d195609dac1276344ce9c5252140d7.tar.bz2 opensim-SC-fea3c20576d195609dac1276344ce9c5252140d7.tar.xz |
* renamed MySceneObject to CpuCounterObject
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/MySceneObject.cs')
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/MySceneObject.cs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs b/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs deleted file mode 100644 index 3828b9d..0000000 --- a/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.Region.Environment.Scenes; | ||
5 | using libsecondlife; | ||
6 | using OpenSim.Framework.Types; | ||
7 | using System.Timers; | ||
8 | using System.Diagnostics; | ||
9 | |||
10 | namespace SimpleApp | ||
11 | { | ||
12 | public class MySceneObject : SceneObject | ||
13 | { | ||
14 | private PerformanceCounter m_counter; | ||
15 | |||
16 | public MySceneObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) | ||
17 | : base(world, eventManager, ownerID, localID, pos, shape ) | ||
18 | { | ||
19 | String objectName = "Processor"; | ||
20 | String counterName = "% Processor Time"; | ||
21 | String instanceName = "_Total"; | ||
22 | |||
23 | m_counter = new PerformanceCounter(objectName, counterName, instanceName); | ||
24 | } | ||
25 | |||
26 | public override void Update( ) | ||
27 | { | ||
28 | float cpu = m_counter.NextValue() / 40f; | ||
29 | LLVector3 size = new LLVector3(cpu, cpu, cpu); | ||
30 | rootPrimitive.ResizeGoup( size ); | ||
31 | |||
32 | base.Update(); | ||
33 | } | ||
34 | } | ||
35 | } | ||