Sleeps for the specified number of milliseconds. @param ms How long to sleep
(long ms)
| 45 | * How long to sleep |
| 46 | */ |
| 47 | public static void sleep(long ms) { |
| 48 | try { |
| 49 | LOG.trace("Sleeping for {} ms", ms); |
| 50 | Thread.sleep(ms); |
| 51 | } catch (InterruptedException e) { // NOSONAR squid:S2142 |
| 52 | LOG.warn("Interrupted while sleeping for {} ms: {}", ms, e.getMessage()); |
| 53 | Thread.currentThread().interrupt(); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Tests if a String matches another String with a wildcard pattern. |