Here you can find the source of toMicro(Duration duration)
public static BigInteger toMicro(Duration duration)
//package com.java2s; //License from project: Open Source License import java.math.BigInteger; import java.time.Duration; public class Main { private static final BigInteger micromult = new BigInteger("1000000"); public static BigInteger toMicro(Duration duration) { BigInteger ret = BigInteger.valueOf(duration.getSeconds()); ret = ret.multiply(micromult);//from ww w .j a va 2 s. co m ret = ret.add(BigInteger.valueOf(duration.getNano() / 1000)); return ret; } }