本文整理了Java中org.apache.brooklyn.util.time.Time.makeTimeStringNanoRounded()
方法的一些代码示例,展示了Time.makeTimeStringNanoRounded()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Time.makeTimeStringNanoRounded()
方法的具体详情如下:
包路径:org.apache.brooklyn.util.time.Time
类名称:Time
方法名:makeTimeStringNanoRounded
暂无
代码示例来源:origin: org.apache.brooklyn/brooklyn-utils-common
/** @see #makeTimeString(long, boolean) */
public static String makeTimeStringRounded(long t, TimeUnit unit) {
long nanos = unit.toNanos(t);
return makeTimeStringNanoRounded(nanos);
}
/**
代码示例来源:origin: org.apache.brooklyn/brooklyn-utils-common
/**
* A nice string representation of the duration; or null if null is passed in.
* @see #makeTimeString(long, boolean)
*/
public static String makeTimeStringRounded(@Nullable Duration d) {
return (d == null) ? null : makeTimeStringNanoRounded(d.toNanoseconds());
}
/** given an elapsed time, makes it readable, eg 44d 6h, or 8s 923ms, optionally rounding */
代码示例来源:origin: org.apache.brooklyn/brooklyn-utils-common
private void checkRN(long nanos, String expected) {
Assert.assertEquals(Time.makeTimeStringNanoRounded(nanos), expected);
}
内容来源于网络,如有侵权,请联系作者删除!