mirror of https://github.com/Icinga/icinga2.git
24 lines
293 B
C
24 lines
293 B
C
|
#ifndef RINGBUFFER_H
|
||
|
#define RINGBUFFER_H
|
||
|
|
||
|
namespace icinga
|
||
|
{
|
||
|
|
||
|
class Ringbuffer
|
||
|
{
|
||
|
public:
|
||
|
Ringbuffer(int slots);
|
||
|
|
||
|
int GetLength(void) const;
|
||
|
void InsertValue(long tv, int num);
|
||
|
int GetValues(long span) const;
|
||
|
|
||
|
private:
|
||
|
vector<int> m_Slots;
|
||
|
int m_Offset;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif /* RINGBUFFER_H */
|