Skip to content

Commit

Permalink
cleanup unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
sidorares committed Apr 30, 2014
1 parent b164d5d commit 9757309
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions lib/packets/packet.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,33 +214,6 @@ Packet.prototype.readDateTimeString = function() {
return str;
};


/*
// TIME - value in microseconds. Can be negative
Packet.prototype.readTime = function(convertTtoMs) {
var length = this.readInt8();
if (length === 0)
return 0;
var result = 0;
var sign = this.readInt8() ? -1 : 1; // 'isNegative' flag byte
var d = 0;
var H = 0;
var M = 0;
var S = 0;
var ms = 0;
if (length > 7) {
d = this.readInt32();
H = this.readInt8();
M = this.readInt8();
S = this.readInt8();
}
if (length > 11)
ms = this.readInt32();
return d*86400000 + H*3600000 + M*60000 + S*1000 + ms;
};
*/

// TIME - value as a string, Can be negative
Packet.prototype.readTimeString = function(convertTtoMs) {
var length = this.readInt8();
Expand Down Expand Up @@ -271,9 +244,7 @@ Packet.prototype.readTimeString = function(convertTtoMs) {
ms *= sign;
return ms;
}
// TODO: add padding
return ( sign === -1 ? '-' : '' ) + [( d ? (d*24) + H : H ), leftPad(2, M), leftPad(2, S)].join(':') + ( ms ? '.'+ ms : '' );
// return ( sign === -1 ? '-' : '' ) + ( d ? d+'d ' : '' ) + [H, M, S].join(':') + ( ms ? '.'+ ms : '' );
};

Packet.prototype.readLengthCodedString = function() {
Expand Down

0 comments on commit 9757309

Please sign in to comment.