libbgp  0.6
A C++ BGP Library.
Public Member Functions | List of all members
libbgp::Clock Class Referenceabstract

The Clock interface. More...

#include <clock.h>

Inheritance diagram for libbgp::Clock:
Inheritance graph
[legend]

Public Member Functions

virtual uint64_t getTime () const =0
 Get the current time. More...
 

Detailed Description

The Clock interface.

The clock interface is used by BgpFsm to get current time to check for time-based events like peer hold timer expired, and determine the timing of KEEPALIVE message. BgpFsm comes with a default Clock implementation, RealtimeClock. RealtimeClock is a clock that uses system time as time.

This might be useful if BgpFsm is used inside a simulator like ns3. A Ns3Clock class should be implemented to report simulated time to BgpFsm.

Definition at line 31 of file clock.h.

Member Function Documentation

◆ getTime()

virtual uint64_t libbgp::Clock::getTime ( ) const
pure virtual

Get the current time.

Returns
uint64_t current time in second.

Implemented in libbgp::RealtimeClock.


The documentation for this class was generated from the following file: