📄 settimestamp.hh
字号:
// -*- c-basic-offset: 4 -*-#ifndef CLICK_SETTIMESTAMP_HH#define CLICK_SETTIMESTAMP_HH#include <click/element.hh>CLICK_DECLS/*=cSetTimestamp([TIMESTAMP, I<keyword> FIRST, DELTA])=s annotationsstore the time in the packet's timestamp annotation=dStore the specified TIMESTAMP in the packet's timestamp annotation. IfTIMESTAMP is not specified, then sets the annotation to the system time whenthe packet arrived at the SetTimestamp element.Keyword arguments are:=over 8=item FIRSTBoolean. If true, then set the packet's "first timestamp" annotation, not itstimestamp annotation. Default is true.=item DELTABoolean. If true, then set the packet's timestamp annotation to thedifference between its current timestamp annotation and its "first timestamp"annotation. Default is false.=back=a StoreTimestamp, PrintOld */class SetTimestamp : public Element { public: SetTimestamp(); ~SetTimestamp(); const char *class_name() const { return "SetTimestamp"; } const char *processing() const { return AGNOSTIC; } int configure(Vector<String> &, ErrorHandler *); Packet *simple_action(Packet *); private: enum { ACT_NOW, ACT_TIME, ACT_FIRST_NOW, ACT_FIRST_TIME, ACT_DELTA }; int _action; Timestamp _tv;};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -