Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: tracing/tracing/model/clock_sync_manager.html

Issue 2955053002: Remove tr.b.identity. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/iteration_helpers.html"> 8 <link rel="import" href="/tracing/base/iteration_helpers.html">
9 9
10 <script> 10 <script>
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 /** 403 /**
404 * A Transformer encapsulates information about how to turn timestamps in one 404 * A Transformer encapsulates information about how to turn timestamps in one
405 * clock domain into timestamps in another. It also stores additional data 405 * clock domain into timestamps in another. It also stores additional data
406 * about the maximum error involved in doing so. 406 * about the maximum error involved in doing so.
407 */ 407 */
408 function Transformer(fn, error) { 408 function Transformer(fn, error) {
409 this.fn = fn; 409 this.fn = fn;
410 this.error = error; 410 this.error = error;
411 } 411 }
412 412
413 Transformer.IDENTITY = new Transformer(tr.b.identity, 0); 413 Transformer.IDENTITY = new Transformer((x => x), 0);
414 414
415 /** 415 /**
416 * Given two transformers, creates a third that's a composition of the two. 416 * Given two transformers, creates a third that's a composition of the two.
417 * 417 *
418 * @param {function(Number): Number} aToB A function capable of converting a 418 * @param {function(Number): Number} aToB A function capable of converting a
419 * timestamp from domain A to domain B. 419 * timestamp from domain A to domain B.
420 * @param {function(Number): Number} bToC A function capable of converting a 420 * @param {function(Number): Number} bToC A function capable of converting a
421 * timestamp from domain B to domain C. 421 * timestamp from domain B to domain C.
422 * 422 *
423 * @return {function(Number): Number} A function capable of converting a 423 * @return {function(Number): Number} A function capable of converting a
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 return new Transformer( 458 return new Transformer(
459 (ts) => ts + tsShift, fromMarker.duration + toMarker.duration); 459 (ts) => ts + tsShift, fromMarker.duration + toMarker.duration);
460 }; 460 };
461 461
462 return { 462 return {
463 ClockDomainId, 463 ClockDomainId,
464 ClockSyncManager, 464 ClockSyncManager,
465 }; 465 };
466 }); 466 });
467 </script> 467 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/metric_registry.html ('k') | tracing/tracing/ui/analysis/memory_dump_allocator_details_pane_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698