Skip to content

Commit

Permalink
Added a return value to Play()
Browse files Browse the repository at this point in the history
Returns the length of the message in seconds
  • Loading branch information
JoshuaCarroll authored Jul 6, 2017
1 parent f53e664 commit fdd5ae9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Morse.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ var MorseJs = {
startTime += this._ditLength * 3; // Short gap (between letters)
}
}

// Returns the length of the message in seconds.
return startTime - this._context.currentTime;
},
codes: {
"A": ".-",
Expand Down

0 comments on commit fdd5ae9

Please sign in to comment.