blob: 5ba58dd020a00a68acf7d5ec818d4fcd952f3d24 [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/base/iteration_helpers.html">
<link rel="import" href="/base/rect.html">
<script>
'use strict';
tv.exportTo('tv.b', function() {
/**
* Float wrapper, representing a time duration, capable of pretty-printing.
*/
function TimeDuration(duration) {
this.duration = duration;
};
TimeDuration.prototype = {
toString: function() {
return this.duration.toFixed(3) + ' ms';
}
};
function TimeStamp(timestamp) {
this.timestamp = timestamp;
};
TimeStamp.prototype = {
toString: function() {
return this.timestamp.toFixed(4) + ' ms';
}
};
return {
TimeStamp: TimeStamp,
TimeDuration: TimeDuration
};
});
</script>