sleep() method only accepts milliseconds and if you need some sleep functionality with another time granularity you have either to calculate the sum of milliseconds and put a magic number in the code
1 | Thread.sleep(86400000L); |
1 | Thread.sleep(1000L * 60 * 60 * 24 ); |
1 | TimeUnit.DAYS.sleep( 1 ); |