mirror of
https://github.com/reactos/reactos.git
synced 2024-07-21 19:58:08 +00:00
![Klemens Friedl](/assets/img/avatar_default.png)
* sumatrapdf - vendor import * everything compiles (libjpeg, poppler, fitz, sumatrapdf) * does NOT link (remove the comment tags in the parent directory.rbuild file (rosapps dir) to build it) svn path=/trunk/; revision=29295
45 lines
845 B
C++
45 lines
845 B
C++
//========================================================================
|
|
//
|
|
// 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 ++;
|
|
}
|
|
|