Initial implementation of HostEpoch
When host time is set, the diff between the BmcTime and the value is
saved to persistent storage;
When host time is retrieved, return the BmcTime plus the diff as
host's time.
Add the unit test cases for HostEpoch.
Change-Id: Ia55b93bfcba4f226ceaed8491136ea7afda7bd77
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/main.cpp b/main.cpp
index 05ac453..b3f4b57 100644
--- a/main.cpp
+++ b/main.cpp
@@ -2,11 +2,13 @@
#include "config.h"
#include "bmc_epoch.hpp"
+#include "host_epoch.hpp"
int main()
{
auto bus = sdbusplus::bus::new_default();
phosphor::time::BmcEpoch bmc(bus, OBJPATH_BMC);
+ phosphor::time::HostEpoch host(bus,OBJPATH_HOST);
bus.request_name(BUSNAME);