blob: 5ba58dd020a00a68acf7d5ec818d4fcd952f3d24 [file] [log] [blame]
Chris Craik44c28202015-05-12 17:25:16 -07001<!DOCTYPE html>
2<!--
3Copyright (c) 2015 The Chromium Authors. All rights reserved.
4Use of this source code is governed by a BSD-style license that can be
5found in the LICENSE file.
6-->
7<link rel="import" href="/base/iteration_helpers.html">
8<link rel="import" href="/base/rect.html">
9<script>
10'use strict';
11
12tv.exportTo('tv.b', function() {
13 /**
14 * Float wrapper, representing a time duration, capable of pretty-printing.
15 */
16 function TimeDuration(duration) {
17 this.duration = duration;
18 };
19
20 TimeDuration.prototype = {
21 toString: function() {
22 return this.duration.toFixed(3) + ' ms';
23 }
24 };
25
26 function TimeStamp(timestamp) {
27 this.timestamp = timestamp;
28 };
29
30 TimeStamp.prototype = {
31 toString: function() {
32 return this.timestamp.toFixed(4) + ' ms';
33 }
34 };
35
36 return {
37 TimeStamp: TimeStamp,
38 TimeDuration: TimeDuration
39 };
40});
41</script>