aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/MySceneObject.cs')
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MySceneObject.cs11
1 files changed, 3 insertions, 8 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs b/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs
index f5c6a0f..3828b9d 100644
--- a/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MySceneObject.cs
@@ -21,20 +21,15 @@ namespace SimpleApp
21 String instanceName = "_Total"; 21 String instanceName = "_Total";
22 22
23 m_counter = new PerformanceCounter(objectName, counterName, instanceName); 23 m_counter = new PerformanceCounter(objectName, counterName, instanceName);
24
25 Timer timer = new Timer();
26 timer.Enabled = true;
27 timer.Interval = 100;
28 timer.Elapsed += new ElapsedEventHandler(this.Heartbeat);
29
30 } 24 }
31 25
32 public void Heartbeat(object sender, EventArgs e) 26 public override void Update( )
33 { 27 {
34 float cpu = m_counter.NextValue() / 40f; 28 float cpu = m_counter.NextValue() / 40f;
35 LLVector3 size = new LLVector3(cpu, cpu, cpu); 29 LLVector3 size = new LLVector3(cpu, cpu, cpu);
36 rootPrimitive.ResizeGoup( size ); 30 rootPrimitive.ResizeGoup( size );
37 update(); 31
32 base.Update();
38 } 33 }
39 } 34 }
40} 35}