mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
Move zeek::net namespace to zeek::run_state namespace.
This also moves all of the code from Net.{h,cc} to RunState.{h,cc} and marks Net.h as deprecated
This commit is contained in:
parent
d608e7c9a5
commit
0ac3fafe13
64 changed files with 477 additions and 467 deletions
14
src/Val.h
14
src/Val.h
|
@ -54,9 +54,11 @@ ZEEK_FORWARD_DECLARE_NAMESPACED(CompositeHash, zeek::detail);
|
|||
ZEEK_FORWARD_DECLARE_NAMESPACED(HashKey, zeek::detail);
|
||||
|
||||
namespace zeek {
|
||||
namespace net {
|
||||
extern double network_time;
|
||||
extern double zeek_start_network_time;
|
||||
namespace run_state {
|
||||
|
||||
extern double network_time;
|
||||
extern double zeek_start_network_time;
|
||||
|
||||
}
|
||||
|
||||
using FuncPtr = zeek::IntrusivePtr<Func>;
|
||||
|
@ -731,7 +733,7 @@ public:
|
|||
: val(std::move(v))
|
||||
{
|
||||
expire_access_time =
|
||||
int(net::network_time - net::zeek_start_network_time);
|
||||
int(run_state::network_time - run_state::zeek_start_network_time);
|
||||
}
|
||||
|
||||
TableEntryVal* Clone(Val::CloneState* state);
|
||||
|
@ -744,9 +746,9 @@ public:
|
|||
|
||||
// Returns/sets time of last expiration relevant access to this value.
|
||||
double ExpireAccessTime() const
|
||||
{ return net::zeek_start_network_time + expire_access_time; }
|
||||
{ return run_state::zeek_start_network_time + expire_access_time; }
|
||||
void SetExpireAccess(double time)
|
||||
{ expire_access_time = int(time - net::zeek_start_network_time); }
|
||||
{ expire_access_time = int(time - run_state::zeek_start_network_time); }
|
||||
|
||||
protected:
|
||||
friend class TableVal;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue