Merge "ui: Reland ABS_TIME_STR ui side"
diff --git a/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256 b/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256
index 43fc3a3..b12f766 100644
--- a/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256
+++ b/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256
@@ -1 +1 @@
-0ec0548f87e4bac68a968606ed5dbaac3b0be7048df84161adb8f6113ac10a36
\ No newline at end of file
+1ceb04291bd5722e4eac9f3bd8e5d8351c064b692fc875708089aaf2a31a2af6
\ No newline at end of file
diff --git a/ui/src/controller/selection_controller.ts b/ui/src/controller/selection_controller.ts
index c57254f..5676f5f 100644
--- a/ui/src/controller/selection_controller.ts
+++ b/ui/src/controller/selection_controller.ts
@@ -135,7 +135,8 @@
     }
 
     const promisedDetails = this.args.engine.query(`
-      SELECT * FROM ${leafTable} WHERE id = ${selectedId};
+      SELECT *, ABS_TIME_STR(ts) as absTime FROM ${leafTable} WHERE id = ${
+        selectedId};
     `);
 
     const [details, args, description] =
@@ -149,6 +150,8 @@
     // Long term these should be handled generically as args but for now
     // handle them specially:
     let ts = undefined;
+    // tslint:disable-next-line:variable-name
+    let absTime = undefined;
     let dur = undefined;
     let name = undefined;
     let category = undefined;
@@ -167,6 +170,9 @@
         case 'thread_ts':
           threadTs = fromNs(Number(v));
           break;
+        case 'absTime':
+          if (v) absTime = `${v}`;
+          break;
         case 'name':
           name = `${v}`;
           break;
@@ -193,6 +199,7 @@
       id: selectedId,
       ts,
       threadTs,
+      absTime,
       dur,
       threadDur,
       name,
diff --git a/ui/src/frontend/chrome_slice_panel.ts b/ui/src/frontend/chrome_slice_panel.ts
index 2cf585a..71db1a4 100644
--- a/ui/src/frontend/chrome_slice_panel.ts
+++ b/ui/src/frontend/chrome_slice_panel.ts
@@ -182,6 +182,9 @@
               'N/A' :
               sliceInfo.category);
       builder.add('Start time', timeToCode(sliceInfo.ts));
+      if (sliceInfo.absTime !== undefined) {
+        builder.add('Absolute Time', sliceInfo.absTime);
+      }
       builder.add(
           'Duration', this.computeDuration(sliceInfo.ts, sliceInfo.dur));
       if (sliceInfo.threadTs !== undefined &&
diff --git a/ui/src/frontend/globals.ts b/ui/src/frontend/globals.ts
index 3381990..c1e6724 100644
--- a/ui/src/frontend/globals.ts
+++ b/ui/src/frontend/globals.ts
@@ -43,6 +43,7 @@
 
 export interface SliceDetails {
   ts?: number;
+  absTime?: string;
   dur?: number;
   threadTs?: number;
   threadDur?: number;