summaryrefslogtreecommitdiff
path: root/ace/Sample_History.inl
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-27 22:36:12 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-27 22:36:12 +0000
commitdfe45b5d06763fdc6a51932192fcd7c43b8fbb9e (patch)
tree2b76ce3e3dd87fba4c4c9d931462aef30063e0bb /ace/Sample_History.inl
parent85f6f6c076d8ed29cda024d9c6255c902220d840 (diff)
downloadATCD-dfe45b5d06763fdc6a51932192fcd7c43b8fbb9e.tar.gz
ChangeLogTag:Fri Oct 27 15:02:56 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'ace/Sample_History.inl')
-rw-r--r--ace/Sample_History.inl11
1 files changed, 11 insertions, 0 deletions
diff --git a/ace/Sample_History.inl b/ace/Sample_History.inl
new file mode 100644
index 00000000000..92d70ac83ef
--- /dev/null
+++ b/ace/Sample_History.inl
@@ -0,0 +1,11 @@
+// $Id$
+
+ACE_INLINE int
+ACE_Sample_History::sample (ACE_UINT64 value)
+{
+ if (this->sample_count_ >= this->max_samples_)
+ return -1;
+
+ this->samples_[this->sample_count_++] = value;
+ return 0;
+}