FileDocCategorySizeDatePackage
LongToMSec.javaAPI DocExample477Wed Sep 05 15:47:18 BST 2001None

LongToMSec

public class LongToMSec extends Object
Convert longs (time_t in UNIX terminology) to seconds.

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

		System.out.println(msToSecs(1000));
		System.out.println(msToSecs(1100));
		System.out.println(msToSecs(1024));
	
public static java.lang.StringmsToSecs(long t)
Convert a long ("time_t") to seconds and milliseconds

		// The first attempt fails for the case "1024"
		//return t/1000 + "." + t%1000;

		return Double.toString(t/1000D);