| 1 | package com.rox.time; | |
| 2 | ||
| 3 | public final class ThreadSleeper implements Sleeper { | |
| 4 | @Override | |
| 5 | public void sleepFor(long nanos) throws InterruptedException { | |
| 6 |
1
1. sleepFor : Replaced long division with multiplication → TIMED_OUT |
long millis = nanos / 1_000_000; |
| 7 |
1
1. sleepFor : Replaced long modulus with multiplication → KILLED |
int remainingNanos = (int) (nanos % 1_000_000); |
| 8 | ||
| 9 |
1
1. sleepFor : removed call to java/lang/Thread::sleep → KILLED |
Thread.sleep(millis, remainingNanos); |
| 10 | } | |
| 11 | } | |
Mutations | ||
| 6 |
1.1 |
|
| 7 |
1.1 |
|
| 9 |
1.1 |