Skip to content

Commit 5237247

Browse files
authored
Merge pull request #116 from lumber1000/waitingTime-fix
waitingTime bug fixed
2 parents d21867a + 4b48c8b commit 5237247

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

escposprinter/src/main/java/com/dantsu/escposprinter/connection/DeviceConnection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ public void send(int addWaitingTime) throws EscPosConnectionException {
5353
try {
5454
this.stream.write(this.data);
5555
this.stream.flush();
56-
this.data = new byte[0];
5756

58-
int waitingTime = addWaitingTime + (int) Math.floor(this.data.length / 16f);
57+
int waitingTime = addWaitingTime + this.data.length / 16;
58+
this.data = new byte[0];
5959
if(waitingTime > 0) {
6060
Thread.sleep(waitingTime);
6161
}

0 commit comments

Comments
 (0)