mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 16:48:00 +00:00
added toSeconds method
no longer relies on the inherited method
This commit is contained in:
parent
9379165928
commit
0856efe50f
1 changed files with 9 additions and 0 deletions
|
@ -70,6 +70,15 @@ define(["Tone/core/Tone", "Tone/type/Time"], function (Tone) {
|
|||
return this.eval();
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the time in seconds.
|
||||
* @return {Seconds}
|
||||
*/
|
||||
Tone.TransportTime.prototype.toSeconds = function(){
|
||||
var val = this._expr();
|
||||
return val + (this._plusNow ? Tone.Transport.seconds : 0);
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the time as a frequency value
|
||||
* @return {Frequency}
|
||||
|
|
Loading…
Reference in a new issue