Here you can find the source of microsToMillis(long micros)
public static long microsToMillis(long micros)
//package com.java2s; /*-//from w ww. j a v a 2s . c o m * See the file LICENSE for redistribution information. * * Copyright (c) 2002,2007 Oracle. All rights reserved. * * $Id: PropUtil.java,v 1.22.2.1 2007/02/01 14:49:54 cwl Exp $ */ public class Main { /** * Convert microseconds to milliseconds, ensuring that any microsecond * value greater than zero converts to at least one millisecond to avoid a * zero millisecond result since Object.wait(0) waits forever. */ public static long microsToMillis(long micros) { return (micros + 999) / 1000; } }