ui: Move high_precision_time.ts & friends to base
This is part of an ongoing effort to move common/frontend/controllers
into base/core.
high_precision_time.ts & friends have very few dependencies, and are
agnostic to anything perfetto, so they feel like a good candidate for
moving to base.
Change-Id: I9083893afde20dabc712c3a9f649b37586e8c605
diff --git a/ui/src/common/high_precision_time.ts b/ui/src/base/high_precision_time.ts
similarity index 98%
rename from ui/src/common/high_precision_time.ts
rename to ui/src/base/high_precision_time.ts
index b65de01..f205c83 100644
--- a/ui/src/common/high_precision_time.ts
+++ b/ui/src/base/high_precision_time.ts
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-import {assertUnreachable} from '../base/logging';
-import {Time, time} from '../base/time';
+import {assertUnreachable} from './logging';
+import {Time, time} from './time';
export type RoundMode = 'round' | 'floor' | 'ceil';
diff --git a/ui/src/common/high_precision_time_span.ts b/ui/src/base/high_precision_time_span.ts
similarity index 99%
rename from ui/src/common/high_precision_time_span.ts
rename to ui/src/base/high_precision_time_span.ts
index 02dcad1..0bb6e75 100644
--- a/ui/src/common/high_precision_time_span.ts
+++ b/ui/src/base/high_precision_time_span.ts
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-import {TimeSpan, time} from '../base/time';
+import {TimeSpan, time} from './time';
import {HighPrecisionTime} from './high_precision_time';
/**
diff --git a/ui/src/common/high_precision_time_span_unittest.ts b/ui/src/base/high_precision_time_span_unittest.ts
similarity index 99%
rename from ui/src/common/high_precision_time_span_unittest.ts
rename to ui/src/base/high_precision_time_span_unittest.ts
index 08b7b79..537d173 100644
--- a/ui/src/common/high_precision_time_span_unittest.ts
+++ b/ui/src/base/high_precision_time_span_unittest.ts
@@ -14,7 +14,7 @@
import {HighPrecisionTime as HPTime} from './high_precision_time';
import {HighPrecisionTimeSpan as HPTimeSpan} from './high_precision_time_span';
-import {Time} from '../base/time';
+import {Time} from './time';
const t = Time.fromRaw;
diff --git a/ui/src/common/high_precision_time_unittest.ts b/ui/src/base/high_precision_time_unittest.ts
similarity index 99%
rename from ui/src/common/high_precision_time_unittest.ts
rename to ui/src/base/high_precision_time_unittest.ts
index 849c001..833d473 100644
--- a/ui/src/common/high_precision_time_unittest.ts
+++ b/ui/src/base/high_precision_time_unittest.ts
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-import {Time, time} from '../base/time';
+import {Time, time} from './time';
import {HighPrecisionTime as HPTime} from './high_precision_time';
const t = Time.fromRaw;
diff --git a/ui/src/common/resolution.ts b/ui/src/common/resolution.ts
index bef056f..43a9fe9 100644
--- a/ui/src/common/resolution.ts
+++ b/ui/src/common/resolution.ts
@@ -14,7 +14,7 @@
import {BigintMath} from '../base/bigint_math';
import {duration} from '../base/time';
-import {HighPrecisionTimeSpan} from './high_precision_time_span';
+import {HighPrecisionTimeSpan} from '../base/high_precision_time_span';
/**
* Work out an appropriate "resolution" for a given time span stretched over a
diff --git a/ui/src/common/track_manager_unittest.ts b/ui/src/common/track_manager_unittest.ts
index b456524..265bba9 100644
--- a/ui/src/common/track_manager_unittest.ts
+++ b/ui/src/common/track_manager_unittest.ts
@@ -16,8 +16,8 @@
import {Duration} from '../base/time';
import {PxSpan, TimeScale} from '../frontend/time_scale';
import {TrackDescriptor, TrackRenderContext} from '../public/track';
-import {HighPrecisionTime} from './high_precision_time';
-import {HighPrecisionTimeSpan} from './high_precision_time_span';
+import {HighPrecisionTime} from '../base/high_precision_time';
+import {HighPrecisionTimeSpan} from '../base/high_precision_time_span';
import {TrackManager} from './track_manager';
function makeMockTrack() {
diff --git a/ui/src/frontend/drag/drag_strategy.ts b/ui/src/frontend/drag/drag_strategy.ts
index 46c0d53..a009706 100644
--- a/ui/src/frontend/drag/drag_strategy.ts
+++ b/ui/src/frontend/drag/drag_strategy.ts
@@ -11,8 +11,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-import {HighPrecisionTime} from '../../common/high_precision_time';
-import {HighPrecisionTimeSpan} from '../../common/high_precision_time_span';
+import {HighPrecisionTime} from '../../base/high_precision_time';
+import {HighPrecisionTimeSpan} from '../../base/high_precision_time_span';
import {raf} from '../../core/raf_scheduler';
import {globals} from '../globals';
import {TimeScale} from '../time_scale';
diff --git a/ui/src/frontend/overview_timeline_panel.ts b/ui/src/frontend/overview_timeline_panel.ts
index 92aab31..c85ba05 100644
--- a/ui/src/frontend/overview_timeline_panel.ts
+++ b/ui/src/frontend/overview_timeline_panel.ts
@@ -35,7 +35,7 @@
import {Size} from '../base/geom';
import {Panel} from './panel_container';
import {PxSpan, TimeScale} from './time_scale';
-import {HighPrecisionTimeSpan} from '../common/high_precision_time_span';
+import {HighPrecisionTimeSpan} from '../base/high_precision_time_span';
export class OverviewTimelinePanel implements Panel {
private static HANDLE_SIZE_PX = 5;
diff --git a/ui/src/frontend/scroll_helper.ts b/ui/src/frontend/scroll_helper.ts
index b74069d..5a8f3b3 100644
--- a/ui/src/frontend/scroll_helper.ts
+++ b/ui/src/frontend/scroll_helper.ts
@@ -14,8 +14,8 @@
import {time} from '../base/time';
import {escapeCSSSelector, exists} from '../base/utils';
-import {HighPrecisionTime} from '../common/high_precision_time';
-import {HighPrecisionTimeSpan} from '../common/high_precision_time_span';
+import {HighPrecisionTime} from '../base/high_precision_time';
+import {HighPrecisionTimeSpan} from '../base/high_precision_time_span';
import {raf} from '../core/raf_scheduler';
import {globals} from './globals';
diff --git a/ui/src/frontend/time_scale.ts b/ui/src/frontend/time_scale.ts
index 0fe19ee..0396a6d 100644
--- a/ui/src/frontend/time_scale.ts
+++ b/ui/src/frontend/time_scale.ts
@@ -13,8 +13,8 @@
// limitations under the License.
import {duration, time} from '../base/time';
-import {HighPrecisionTime} from '../common/high_precision_time';
-import {HighPrecisionTimeSpan} from '../common/high_precision_time_span';
+import {HighPrecisionTime} from '../base/high_precision_time';
+import {HighPrecisionTimeSpan} from '../base/high_precision_time_span';
export class TimeScale {
readonly timeSpan: HighPrecisionTimeSpan;
diff --git a/ui/src/frontend/time_scale_unittest.ts b/ui/src/frontend/time_scale_unittest.ts
index 16b4548..e856655 100644
--- a/ui/src/frontend/time_scale_unittest.ts
+++ b/ui/src/frontend/time_scale_unittest.ts
@@ -13,8 +13,8 @@
// limitations under the License.
import {Time} from '../base/time';
-import {HighPrecisionTime} from '../common/high_precision_time';
-import {HighPrecisionTimeSpan} from '../common/high_precision_time_span';
+import {HighPrecisionTime} from '../base/high_precision_time';
+import {HighPrecisionTimeSpan} from '../base/high_precision_time_span';
import {PxSpan, TimeScale} from './time_scale';
const t = Time.fromRaw;
diff --git a/ui/src/frontend/timeline.ts b/ui/src/frontend/timeline.ts
index 9a40ea1..d18c039 100644
--- a/ui/src/frontend/timeline.ts
+++ b/ui/src/frontend/timeline.ts
@@ -15,7 +15,7 @@
import {assertTrue} from '../base/logging';
import {Store} from '../base/store';
import {time, TimeSpan} from '../base/time';
-import {HighPrecisionTimeSpan} from '../common/high_precision_time_span';
+import {HighPrecisionTimeSpan} from '../base/high_precision_time_span';
import {Area, State} from '../common/state';
import {raf} from '../core/raf_scheduler';
import {ratelimit} from './rate_limiters';
diff --git a/ui/src/public/track.ts b/ui/src/public/track.ts
index 39b17f3..6148afe 100644
--- a/ui/src/public/track.ts
+++ b/ui/src/public/track.ts
@@ -19,7 +19,7 @@
import {LegacySelection, Selection} from '../core/selection_manager';
import {Size, VerticalBounds} from '../base/geom';
import {TimeScale} from '../frontend/time_scale';
-import {HighPrecisionTimeSpan} from '../common/high_precision_time_span';
+import {HighPrecisionTimeSpan} from '../base/high_precision_time_span';
import {ColorScheme} from './color_scheme';
export interface TrackContext {