Here you can find the source of toNanoseconds(long sec, long nanos)
public static long toNanoseconds(long sec, long nanos)
//package com.java2s; /******************************************************************************* * Copyright (c) 2009 Clark N. Hobbie/*from w ww . ja va 2 s .com*/ * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Clark N. Hobbie - initial API and implementation *******************************************************************************/ public class Main { public static long toNanoseconds(long sec, long nanos) { long result = nanos; result = result + 1000000000 * sec; return result; } }