Traces with real-to-elapsed time offset

Add real_to_elapsed_time_offset_nanos field to protobuf traces:
- SF layers
- SF transactions

Bug: 235196806
Test: record and view SF + transaction traces with winscope
Change-Id: I5f4d2a2b4e2ceaacf75c43d01f866fe1e2b76532
diff --git a/services/surfaceflinger/layerproto/layerstrace.proto b/services/surfaceflinger/layerproto/layerstrace.proto
index 7def024..804a499 100644
--- a/services/surfaceflinger/layerproto/layerstrace.proto
+++ b/services/surfaceflinger/layerproto/layerstrace.proto
@@ -38,6 +38,10 @@
 
     optional fixed64 magic_number = 1;  /* Must be the first field, set to value in MagicNumber */
     repeated LayersTraceProto entry = 2;
+
+    /* offset between real-time clock and elapsed time clock in nanoseconds.
+       Calculated as: systemTime(SYSTEM_TIME_REALTIME) - systemTime(SYSTEM_TIME_MONOTONIC) */
+    optional fixed64 real_to_elapsed_time_offset_nanos = 3;
 }
 
 /* one layers trace entry. */