timestampaccum.hh

来自「COPE the first practical network coding 」· HH 代码 · 共 62 行

HH
62
字号
// -*- c-basic-offset: 4 -*-#ifndef CLICK_TIMESTAMPACCUM_HH#define CLICK_TIMESTAMPACCUM_HH#include <click/element.hh>CLICK_DECLS/*=cTimestampAccum()=s measurementcollects differences in timestamps=dFor each passing packet, measures the elapsed time since the packet'stimestamp. Keeps track of the total elapsed time accumulated over all packets.=n=h count read-onlyReturns the number of packets that have passed.=h time read-onlyReturns the accumulated timestamp difference for all passing packets.=h average_time read-onlyReturns the average timestamp difference over all passing packets.=h reset_counts write-onlyResets C<count> and C<time> counters to zero when written.=a SetCycleCount, RoundTripCycleCount, SetPerfCount, PerfCountAccum */class TimestampAccum : public Element { public:        TimestampAccum();    ~TimestampAccum();      const char *class_name() const	{ return "TimestampAccum"; }    const char *processing() const	{ return AGNOSTIC; }    int initialize(ErrorHandler *);    void add_handlers();    Packet *simple_action(Packet *);  private:      double _usec_accum;    uint64_t _count;    static String read_handler(Element *, void *);    static int reset_handler(const String &, Element *, void *, ErrorHandler *);  };CLICK_ENDDECLS#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?