summaryrefslogtreecommitdiff
path: root/trunk/TAO/examples/Kokyu_dsrt_schedulers/Task_Stats.inl
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/TAO/examples/Kokyu_dsrt_schedulers/Task_Stats.inl')
-rw-r--r--trunk/TAO/examples/Kokyu_dsrt_schedulers/Task_Stats.inl19
1 files changed, 19 insertions, 0 deletions
diff --git a/trunk/TAO/examples/Kokyu_dsrt_schedulers/Task_Stats.inl b/trunk/TAO/examples/Kokyu_dsrt_schedulers/Task_Stats.inl
new file mode 100644
index 00000000000..0971502bcc0
--- /dev/null
+++ b/trunk/TAO/examples/Kokyu_dsrt_schedulers/Task_Stats.inl
@@ -0,0 +1,19 @@
+//$Id$
+
+#include "ace/Log_Msg.h"
+
+ACE_INLINE int
+Task_Stats::sample (ACE_UINT32 thr_run_time, int thr_count)
+{
+ if (this->samples_count_ >= this->max_samples_)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Task_Stats::sample ret -1\n"));
+ return -1;
+ }
+
+ this->thr_run_time_[this->samples_count_] = thr_run_time;
+ this->thr_count_[this->samples_count_] = thr_count;
+
+ this->samples_count_++;
+ return 0;
+}