| 71 | } |
| 72 | |
| 73 | public interface Clock { |
| 74 | |
| 75 | /** |
| 76 | * 系统当前时间 |
| 77 | */ |
| 78 | Date currentDate(); |
| 79 | |
| 80 | /** |
| 81 | * 系统当前时间戳 |
| 82 | */ |
| 83 | long currentTimeMillis(); |
| 84 | |
| 85 | /** |
| 86 | * 操作系统启动到现在的纳秒数,与系统时间是完全独立的两个时间体系 |
| 87 | */ |
| 88 | long nanoTime(); |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * 默认时间提供者,返回当前的时间,线程安全。 |
no outgoing calls
no test coverage detected