diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-12-02 08:29:54 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-12-02 08:29:54 +0000 |
commit | 9ac026df0b860968a28af4b64d75c2246924ff40 (patch) | |
tree | 003bc69195243ecb8a85c19ef47289cf0dbe902b /Build/source/libs/poppler/poppler-0.24.4/poppler/ProfileData.cc | |
parent | 6878f3b116ead23f6646b74888e0a4f0dce69796 (diff) |
poppler 0.24.4
git-svn-id: svn://tug.org/texlive/trunk@32298 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/poppler/poppler-0.24.4/poppler/ProfileData.cc')
-rw-r--r-- | Build/source/libs/poppler/poppler-0.24.4/poppler/ProfileData.cc | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Build/source/libs/poppler/poppler-0.24.4/poppler/ProfileData.cc b/Build/source/libs/poppler/poppler-0.24.4/poppler/ProfileData.cc new file mode 100644 index 00000000000..a0c44747a56 --- /dev/null +++ b/Build/source/libs/poppler/poppler-0.24.4/poppler/ProfileData.cc @@ -0,0 +1,44 @@ +//======================================================================== +// +// ProfileData.cc +// +// Copyright 2005 Jonathan Blandford <jrb@gnome.org> +// +//======================================================================== + +#include <config.h> + +#ifdef USE_GCC_PRAGMAS +#pragma implementation +#endif + +#include <stdlib.h> +#include <stddef.h> +#include "ProfileData.h" + +//------------------------------------------------------------------------ +// ProfileData +//------------------------------------------------------------------------ + +ProfileData::ProfileData() { + count = 0; + total = 0.0; + min = 0.0; + max = 0.0; +} + +void +ProfileData::addElement (double elapsed) { + if (count == 0) { + min = elapsed; + max = elapsed; + } else { + if (elapsed < min) + min = elapsed; + if (elapsed > max) + max = elapsed; + } + total += elapsed; + count ++; +} + |