Skip to content

Commit

Permalink
Merge pull request #116 from lumber1000/waitingTime-fix
Browse files Browse the repository at this point in the history
waitingTime bug fixed
  • Loading branch information
DantSu authored Mar 15, 2021
2 parents d21867a + 4b48c8b commit 5237247
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public void send(int addWaitingTime) throws EscPosConnectionException {
try {
this.stream.write(this.data);
this.stream.flush();
this.data = new byte[0];

int waitingTime = addWaitingTime + (int) Math.floor(this.data.length / 16f);
int waitingTime = addWaitingTime + this.data.length / 16;
this.data = new byte[0];
if(waitingTime > 0) {
Thread.sleep(waitingTime);
}
Expand Down

0 comments on commit 5237247

Please sign in to comment.