summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/net_internals/time_util.js
diff options
context:
space:
mode:
authortbreisacher@chromium.org <tbreisacher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-22 20:33:10 +0000
committertbreisacher@chromium.org <tbreisacher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-22 20:33:10 +0000
commitffe4614b9a9b779bbe1afb91c430dc6de5d4a093 (patch)
tree637ed3139df03117d70e8889546445e9100505af /chrome/browser/resources/net_internals/time_util.js
parentb4a72d84bd60f2f8c16d0b7ce397c9fbec88c4c1 (diff)
downloadchromium_src-ffe4614b9a9b779bbe1afb91c430dc6de5d4a093.zip
chromium_src-ffe4614b9a9b779bbe1afb91c430dc6de5d4a093.tar.gz
chromium_src-ffe4614b9a9b779bbe1afb91c430dc6de5d4a093.tar.bz2
JavaScript nits in net_internals
Fixing these will allow us to run our PRESUBMIT checks on net_internals/ BUG=none TEST=none Review URL: http://codereview.chromium.org/9818005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/net_internals/time_util.js')
-rw-r--r--chrome/browser/resources/net_internals/time_util.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/resources/net_internals/time_util.js b/chrome/browser/resources/net_internals/time_util.js
index 21c5409..c738468 100644
--- a/chrome/browser/resources/net_internals/time_util.js
+++ b/chrome/browser/resources/net_internals/time_util.js
@@ -24,8 +24,8 @@ var timeutil = (function() {
* The browser gives us times in terms of "time ticks" in milliseconds.
* This function converts the tick count to a Date() object.
*
- * @param {String} timeTicks.
- * @returns {Date} The time that |timeTicks| represents.
+ * @param {String} timeTicks A time represented in "time ticks".
+ * @return {Date} The time that |timeTicks| represents.
*/
function convertTimeTicksToDate(timeTicks) {
var timeStampMs = timeTickOffset + (timeTicks - 0);
@@ -35,7 +35,7 @@ var timeutil = (function() {
/**
* Returns the current time.
*
- * @returns {number} Milliseconds since the Unix epoch.
+ * @return {number} Milliseconds since the Unix epoch.
*/
function getCurrentTime() {
return (new Date()).getTime();
@@ -44,9 +44,9 @@ var timeutil = (function() {
/**
* Adds an HTML representation of |date| to |parentNode|.
*
- * @param {DomNode} parentNode
- * @param {Date} date
- * @returns {DomNode} The node containing the date/time.
+ * @param {DomNode} parentNode The node that will contain the new node.
+ * @param {Date} date The date to be displayed.
+ * @return {DomNode} The new node containing the date/time.
*/
function addNodeWithDate(parentNode, date) {
var span = addNodeWithText(parentNode, 'span', dateToString(date));
@@ -57,8 +57,8 @@ var timeutil = (function() {
/**
* Returns a string representation of |date|.
*
- * @param {Date} date
- * @returns {String}
+ * @param {Date} date The date to be represented.
+ * @return {String} A string representation of |date|.
*/
function dateToString(date) {
var dateStr = date.getFullYear() + '-' +
@@ -75,6 +75,9 @@ var timeutil = (function() {
/**
* Prefixes enough zeros to |num| so that it has length |len|.
+ * @param {number} num The number to be padded.
+ * @param {number} len The desired length of the returned string.
+ * @return {string} The zero-padded representation of |num|.
*/
function zeroPad_(num, len) {
var str = num + '';