Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Basic_Stats.inl
blob4e34469e76eb5bfbf42457a3658dcc79f03189b9
1 // -*- C++ -*-
2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
4 ACE_INLINE
5 ACE_Basic_Stats::ACE_Basic_Stats ()
6   : samples_count_ (0)
7   , min_ (0)
8   , min_at_ (0)
9   , max_ (0)
10   , max_at_ (0)
11   , sum_ (0)
15 ACE_INLINE ACE_UINT32
16 ACE_Basic_Stats::samples_count () const
18   return this->samples_count_;
21 ACE_INLINE void
22 ACE_Basic_Stats::sample (ACE_UINT64 value)
24   ++this->samples_count_;
26   if (this->samples_count_ == 1u)
27     {
28       this->min_ = value;
29       this->min_at_ = this->samples_count_;
30       this->max_ = value;
31       this->max_at_ = this->samples_count_;
32     }
33   else
34     {
35       if (this->min_ > value)
36         {
37           this->min_ = value;
38           this->min_at_ = this->samples_count_;
39         }
40       if (this->max_ < value)
41         {
42           this->max_ = value;
43           this->max_at_ = this->samples_count_;
44         }
45     }
47   this->sum_ += value;
50 ACE_END_VERSIONED_NAMESPACE_DECL