blob: 1aa71b7797babdd750bd4cba7f1a4a979f97ea54 [file] [log] [blame]
#include "mock_network_manager.hpp"
#include "types.hpp"
#include <sdeventplus/event.hpp>
namespace phosphor
{
namespace network
{
std::unique_ptr<MockManager> manager = nullptr;
std::unique_ptr<Timer> refreshObjectTimer = nullptr;
std::unique_ptr<Timer> restartTimer = nullptr;
/** @brief refresh the network objects. */
void refreshObjects()
{
if (manager)
{
manager->createChildObjects();
}
}
void initializeTimers()
{
refreshObjectTimer = std::make_unique<Timer>(
sdeventplus::Event::get_default(), std::bind(refreshObjects));
}
} // namespace network
} // namespace phosphor