Java用帯域制限ライブラリ
Revision | 692da0e83fb7a9072aef01bba2c7d4eeea72969c (tree) |
---|---|
Time | 2009-07-27 15:38:59 |
Author | Senju Higurashi <senju@user...> |
Commiter | Senju Higurashi |
デバッグ出力を削除
@@ -66,17 +66,6 @@ class BandWidthController { | ||
66 | 66 | |
67 | 67 | final double currentBps = getCurrentBps(); |
68 | 68 | |
69 | - // TODO:デバッグ文 | |
70 | - System.err.println(); | |
71 | - System.err.println("bandwidth(bps): " + this.bandWidth); | |
72 | - System.err.println("currentBps(bps): " + currentBps); | |
73 | - System.err.println("bandwidth(Kbps): " + this.bandWidth / 1024); | |
74 | - System.err.println("currentBps(Kbps): " + currentBps / 1024); | |
75 | - System.err.println("bandwidth(Mbps): " + this.bandWidth / 1024 / 1024); | |
76 | - System.err.println("currentBps(Mbps): " + currentBps / 1024 / 1024); | |
77 | - System.err.println("cycle: " + this.cycle); | |
78 | - System.err.println("bytePerCycle: " + this.bytePerCycle); | |
79 | - | |
80 | 69 | // 現在の速度がbandWidthより出ている場合は書き込まない。 |
81 | 70 | if (currentBps > this.bandWidth) { |
82 | 71 | return new SizeAndInterval(0, this.cycle); |
@@ -101,9 +90,6 @@ class BandWidthController { | ||
101 | 90 | } |
102 | 91 | final long startTime = this.timeList.get(firstIndex); |
103 | 92 | final long currentTime = System.currentTimeMillis(); |
104 | - // TODO:デバッグ文 | |
105 | - System.err.println("real interval: " | |
106 | - + (currentTime - this.timeList.getLast())); | |
107 | 93 | long intervalInMillis = currentTime - startTime; |
108 | 94 | // 最低1ミリ秒以上の待機時間を確保(時計の設定変更等の対応) |
109 | 95 | intervalInMillis = Math.max(1, intervalInMillis); |
@@ -122,8 +108,6 @@ class BandWidthController { | ||
122 | 108 | public SizeAndInterval preWrite(int bufferSize) { |
123 | 109 | final SizeAndInterval si = calculationSizeForWrite(bufferSize); |
124 | 110 | this.timeList.add(System.currentTimeMillis()); |
125 | - // TODO: デバッグ用 | |
126 | - System.err.println(si); | |
127 | 111 | |
128 | 112 | return si; |
129 | 113 | } |
@@ -137,8 +121,6 @@ class BandWidthController { | ||
137 | 121 | * preWriteを呼び出す前にpostWriteが呼ばれた時 |
138 | 122 | */ |
139 | 123 | public void postWrite(int writtenSize) throws AsymmetricalCallException { |
140 | - // デバッグ文 | |
141 | - System.err.println("writtenSize:" + writtenSize); | |
142 | 124 | this.sizeList.add(writtenSize); |
143 | 125 | removeListItems(); |
144 | 126 | if (this.sizeList.size() != this.timeList.size()) { |