Think of it in terms of seconds vs hours. Dividing gets you the lower (less precise) resolution, so to convert seconds to hours you divide by 3,600.
Converting nanoseconds to milliseconds (i.e. to a less precise resolution) works the same way, except you divide by 1,000,000.
That is exactly what TimeUnit.NANOSECONDS.toMillis() does:

```
public enum TimeUnit {
    NANOSECONDS {
        ...
        public long toMillis(long d)  { return d/(C2/C0); }
        ...
    },
    ...
    static final long C0 = 1L;
    static final long C1 = C0 * 1000L;
    static final long C2 = C1 * 1000L;
    ...
}
```