timedata/network: minor.
This commit is contained in:
parent
eeeff1f795
commit
e823222e45
@ -137,6 +137,15 @@ Network.prototype.now = function now() {
|
|||||||
return this.time.now();
|
return this.time.now();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get network adjusted time in milliseconds.
|
||||||
|
* @returns {Number}
|
||||||
|
*/
|
||||||
|
|
||||||
|
Network.prototype.ms = function ms() {
|
||||||
|
return this.time.ms();
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a network. Get existing network if possible.
|
* Create a network. Get existing network if possible.
|
||||||
* @param {NetworkType|Object} options
|
* @param {NetworkType|Object} options
|
||||||
|
|||||||
@ -120,6 +120,15 @@ TimeData.prototype.local = function local(time) {
|
|||||||
return time - this.offset;
|
return time - this.offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current adjusted time in milliseconds.
|
||||||
|
* @returns {Number} Adjusted Time.
|
||||||
|
*/
|
||||||
|
|
||||||
|
TimeData.prototype.ms = function ms() {
|
||||||
|
return util.ms() + this.offset * 1000;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helpers
|
* Helpers
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user