libktorrent
2.2.0
|
#include <timeestimator.h>
Public Types | |
enum | { SAMPLE_COUNT_MAX = 20 } |
Public Member Functions | |
int | count () |
Uint32 | first () |
bool | isFull () |
Uint32 | last () |
void | push (Uint32 sample) |
Uint32 | sum () |
Simple queue class for samples. Optimized for speed and size without possibility to dynamically resize itself.
Definition at line 54 of file timeestimator.h.
int bt::SampleQueue::count | ( | ) |
This function will return the number of samples in queue until it counts m_size number of elements. After this point it will always return m_size since no samples are being deleted.
void bt::SampleQueue::push | ( | Uint32 | sample | ) |
Inserts new sample into the queue. The oldest sample is overwritten.
Uint32 bt::SampleQueue::sum | ( | ) |
Returns the sum of all samples.