Skip to content

Commit

Permalink
Fix for Throughput Shaping Timer for unexpected test break before con…
Browse files Browse the repository at this point in the history
…figured time when running in kubernetes environment
  • Loading branch information
Coder1304 committed Sep 3, 2024
1 parent a7d0124 commit 3e6fa85
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public VariableThroughputTimer() {
*/
public synchronized long delay() {
while (true) {
long curTimeMs = System.currentTimeMillis();
long curTimeMs = System.nanoTime() / 1_000_000;
long millisSinceLastSecond = curTimeMs % 1000;
long nowInMsRoundedAtSec = curTimeMs - millisSinceLastSecond;
checkNextSecond(nowInMsRoundedAtSec);
Expand Down

0 comments on commit 3e6fa85

Please sign in to comment.