add support for replaying log messages

For example, this allows reproducing logged but hard to physically
reproduce problems to control loops with more logging to help debug the
problem, and then verifying that it does something different under the
same conditions.

Change-Id: I1e55e7a7c0b3154bcaf86373a9e6c57c594310a0
diff --git a/aos/common/time.h b/aos/common/time.h
index 9c86168..9afe9a0 100644
--- a/aos/common/time.h
+++ b/aos/common/time.h
@@ -242,6 +242,14 @@
 // Sleeps until clock is at the time represented by time.
 void SleepUntil(const Time &time, clockid_t clock = Time::kDefaultClock);
 
+// Sets the global offset for all times so ::aos::time::Time::Now() will return
+// now.
+// There is no synchronization here, so this is only safe when only a single
+// task is running.
+// This is only allowed when the shared memory core infrastructure has been
+// initialized in this process.
+void OffsetToNow(const Time &now);
+
 // RAII class that freezes Time::Now() (to avoid making large numbers of
 // syscalls to find the real time).
 class TimeFreezer {