mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Reorganizing file analysis source code.
This commit is contained in:
parent
f04d189d3f
commit
f8af42cf9a
14 changed files with 675 additions and 603 deletions
33
src/file_analysis/InfoTimer.h
Normal file
33
src/file_analysis/InfoTimer.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
#ifndef FILE_ANALYSIS_INFOTIMER_H
|
||||
#define FILE_ANALYSIS_INFOTIMER_H
|
||||
|
||||
#include "Timer.h"
|
||||
#include <string>
|
||||
|
||||
namespace file_analysis {
|
||||
|
||||
/**
|
||||
* Timer to periodically check if file analysis for a given file is inactive.
|
||||
*/
|
||||
class InfoTimer : public Timer {
|
||||
public:
|
||||
|
||||
InfoTimer(double t, const string& id, double interval)
|
||||
: Timer(t + interval, TIMER_FILE_ANALYSIS_INACTIVITY), file_id(id) {}
|
||||
|
||||
~InfoTimer() {}
|
||||
|
||||
/**
|
||||
* Check inactivity of file_analysis::Info corresponding to #file_id,
|
||||
* reschedule if active, else call file_analysis::Manager::Timeout.
|
||||
*/
|
||||
void Dispatch(double t, int is_expire);
|
||||
|
||||
protected:
|
||||
|
||||
string file_id;
|
||||
};
|
||||
|
||||
} // namespace file_analysis
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue