Here you can find the source of getNanos()
public static String getNanos()
//package com.java2s; //License from project: Apache License import java.text.DecimalFormat; import java.text.NumberFormat; public class Main { public static String getNanos() { NumberFormat nf = new DecimalFormat("000000000"); String dateStr = nf.format(System.nanoTime()); return dateStr; }// w w w .j av a 2 s . c om }