Populate timestamps with microsecond precision

xyz.openbmc_project.Time.EpochTime is defined as time elapsed since the
epoch in microseconds.

xyz.openbmc_project.Common.Progress.StartTime and
xyz.openbmc_project.Common.Progress.CompletedTime are similarly
defined as microseconds.

Change timestamps that are currently captured in seconds to
microseconds.

Tested:

Check xyz.openbmc_project.Time.EpochTime,
xyz.openbmc_project.Common.Progress.StartTime, and
xyz.openbmc_project.Common.Progress.CompletedTime timestamps of dump
entries.

Example:
busctl introspect xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc/entry/1

Signed-off-by: Claire Weinan <cweinan@google.com>
Change-Id: I6ea220af07f06ad79de0b62b24ce6cd5ba5fd33d
diff --git a/dump-extensions/openpower-dumps/dump_manager_system.cpp b/dump-extensions/openpower-dumps/dump_manager_system.cpp
index e8e8953..7310dec 100644
--- a/dump-extensions/openpower-dumps/dump_manager_system.cpp
+++ b/dump-extensions/openpower-dumps/dump_manager_system.cpp
@@ -26,7 +26,10 @@
 {
 
     // Get the timestamp
-    std::time_t timeStamp = std::time(nullptr);
+    uint64_t timeStamp =
+        std::chrono::duration_cast<std::chrono::microseconds>(
+            std::chrono::system_clock::now().time_since_epoch())
+            .count();
 
     // System dump can get created due to a fault in server
     // or by request from user. A system dump by fault is
@@ -107,7 +110,10 @@
     auto id = lastEntryId + 1;
     auto idString = std::to_string(id);
     auto objPath = std::filesystem::path(baseEntryPath) / idString;
-    std::time_t timeStamp = std::time(nullptr);
+    uint64_t timeStamp =
+        std::chrono::duration_cast<std::chrono::microseconds>(
+            std::chrono::system_clock::now().time_since_epoch())
+            .count();
 
     try
     {