mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Reformat the world
This commit is contained in:
parent
194cb24547
commit
b2f171ec69
714 changed files with 35149 additions and 35203 deletions
|
@ -1,16 +1,17 @@
|
|||
// See the file "COPYING" in the main distribution directory for copyright.
|
||||
|
||||
#include "zeek/file_analysis/FileTimer.h"
|
||||
|
||||
#include "zeek/file_analysis/File.h"
|
||||
#include "zeek/file_analysis/Manager.h"
|
||||
|
||||
namespace zeek::file_analysis::detail {
|
||||
namespace zeek::file_analysis::detail
|
||||
{
|
||||
|
||||
FileTimer::FileTimer(double t, const std::string& id, double interval)
|
||||
: zeek::detail::Timer(t + interval, zeek::detail::TIMER_FILE_ANALYSIS_INACTIVITY), file_id(id)
|
||||
{
|
||||
DBG_LOG(DBG_FILE_ANALYSIS, "New %f second timeout timer for %s",
|
||||
interval, file_id.c_str());
|
||||
DBG_LOG(DBG_FILE_ANALYSIS, "New %f second timeout timer for %s", interval, file_id.c_str());
|
||||
}
|
||||
|
||||
void FileTimer::Dispatch(double t, bool is_expire)
|
||||
|
@ -23,8 +24,10 @@ void FileTimer::Dispatch(double t, bool is_expire)
|
|||
double last_active = file->GetLastActivityTime();
|
||||
double inactive_time = t > last_active ? t - last_active : 0.0;
|
||||
|
||||
DBG_LOG(DBG_FILE_ANALYSIS, "Checking inactivity for %s, last active at %f, "
|
||||
"inactive for %f", file_id.c_str(), last_active, inactive_time);
|
||||
DBG_LOG(DBG_FILE_ANALYSIS,
|
||||
"Checking inactivity for %s, last active at %f, "
|
||||
"inactive for %f",
|
||||
file_id.c_str(), last_active, inactive_time);
|
||||
|
||||
if ( last_active == 0.0 )
|
||||
{
|
||||
|
@ -40,4 +43,4 @@ void FileTimer::Dispatch(double t, bool is_expire)
|
|||
file->ScheduleInactivityTimer();
|
||||
}
|
||||
|
||||
} // namespace zeek::file_analysis::detail
|
||||
} // namespace zeek::file_analysis::detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue