// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.ArrayList;
import java.util.List;

public class TimeGranularity {
    public static void main(String[] args) {
        List<Long> ms = new ArrayList<Long>();
        long oldval = System.currentTimeMillis();
        while(ms.size() < 20) {
            long newval = System.currentTimeMillis();
            if(newval > oldval) {
                ms.add(oldval);
                oldval = newval;
            }
        }
        for(long v : ms) {
            System.out.println(v);
        }
    }
}
