TimeUtil

public class TimeUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.TimeUtil


Contains time related utility methods.

Summary

Public methods

static String formatElapsedTime(long elapsedTimeMs)

Return a prettified version of the given elapsed time in milliseconds.

static String formatTimeStamp(long epochTime)

Return a readable formatted version of the given epoch time.

static String formatTimeStampGMT(long epochTime)

Return a readable formatted version of the given epoch time in GMT time instead of the local timezone.

Public methods

formatElapsedTime

public static String formatElapsedTime (long elapsedTimeMs)

Return a prettified version of the given elapsed time in milliseconds.

Parameters
elapsedTimeMs long

Returns
String

formatTimeStamp

public static String formatTimeStamp (long epochTime)

Return a readable formatted version of the given epoch time.

Parameters
epochTime long: the epoch time in milliseconds

Returns
String a user readable string

formatTimeStampGMT

public static String formatTimeStampGMT (long epochTime)

Return a readable formatted version of the given epoch time in GMT time instead of the local timezone.

Parameters
epochTime long: the epoch time in milliseconds

Returns
String a user readable string