📄 timestampaccum.hh
字号:
// -*- 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -