Skip to content

Commit

Permalink
change toTimetagBuffer: interpret a number as a unix timestamp,
Browse files Browse the repository at this point in the history
not a relative time
  • Loading branch information
crucialfelix committed Dec 28, 2015
1 parent e0c6893 commit 4defdcc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@
//### .deltaTimetag(secondsFromNow, [now])
// Make NTP timetag array relative to the current time.
//
// `toBuffer` already accepts floats for timetags and interprets this as a relative time, so you might not need this function. If you need to schedule bundles with finer than millisecond accuracy then you could use this to help assemble the NTP array.
exports.deltaTimetag = utils.deltaTimetag;

}).call(this);
2 changes: 1 addition & 1 deletion lib/osc-utilities.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ exports.ntpToFractionalSeconds = (fracSeconds) ->
# as a Buffer for adding to an OSC bundle.
exports.toTimetagBuffer = (timetag) ->
if typeof timetag is "number"
timetag = exports.deltaTimetag(timetag)
timetag = exports.timestampToTimetag(timetag)
else if typeof timetag is "object" and ("getTime" of timetag)
# quacks like a Date
timetag = exports.dateToTimetag(timetag)
Expand Down

0 comments on commit 4defdcc

Please sign in to comment.