当前位置: 首页>>代码示例>>Java>>正文


Java TimeUtils类代码示例

本文整理汇总了Java中android.support.v4.util.TimeUtils的典型用法代码示例。如果您正苦于以下问题:Java TimeUtils类的具体用法?Java TimeUtils怎么用?Java TimeUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TimeUtils类属于android.support.v4.util包,在下文中一共展示了TimeUtils类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: dump

import android.support.v4.util.TimeUtils; //导入依赖的package包/类
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
    super.dump(prefix, fd, writer, args);
    if (this.mTask != null) {
        writer.print(prefix);
        writer.print("mTask=");
        writer.print(this.mTask);
        writer.print(" waiting=");
        writer.println(this.mTask.waiting);
    }
    if (this.mCancellingTask != null) {
        writer.print(prefix);
        writer.print("mCancellingTask=");
        writer.print(this.mCancellingTask);
        writer.print(" waiting=");
        writer.println(this.mCancellingTask.waiting);
    }
    if (this.mUpdateThrottle != 0) {
        writer.print(prefix);
        writer.print("mUpdateThrottle=");
        TimeUtils.formatDuration(this.mUpdateThrottle, writer);
        writer.print(" mLastLoadCompleteTime=");
        TimeUtils.formatDuration(this.mLastLoadCompleteTime, SystemClock.uptimeMillis(), writer);
        writer.println();
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:26,代码来源:AsyncTaskLoader.java

示例2: dump

import android.support.v4.util.TimeUtils; //导入依赖的package包/类
@Override
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
    super.dump(prefix, fd, writer, args);
    if (mTask != null) {
        writer.print(prefix); writer.print("mTask="); writer.print(mTask);
                writer.print(" waiting="); writer.println(mTask.waiting);
    }
    if (mCancellingTask != null) {
        writer.print(prefix); writer.print("mCancellingTask="); writer.print(mCancellingTask);
                writer.print(" waiting="); writer.println(mCancellingTask.waiting);
    }
    if (mUpdateThrottle != 0) {
        writer.print(prefix); writer.print("mUpdateThrottle=");
                TimeUtils.formatDuration(mUpdateThrottle, writer);
                writer.print(" mLastLoadCompleteTime=");
                TimeUtils.formatDuration(mLastLoadCompleteTime,
                        SystemClock.uptimeMillis(), writer);
                writer.println();
    }
}
 
开发者ID:bestarandyan,项目名称:ShoppingMall,代码行数:21,代码来源:AsyncTaskLoader.java

示例3: toString

import android.support.v4.util.TimeUtils; //导入依赖的package包/类
String toString(long now) {
    StringBuilder b = new StringBuilder();
    b.append("{ when=");
    TimeUtils.formatDuration(when - now, b);

    if (target != null) {
        if (callback != null) {
            b.append(" callback=");
            b.append(callback.getClass().getName());
        } else {
            b.append(" what=");
            b.append(what);
        }

        if (arg1 != 0) {
            b.append(" arg1=");
            b.append(arg1);
        }

        if (arg2 != 0) {
            b.append(" arg2=");
            b.append(arg2);
        }

        if (obj != null) {
            b.append(" obj=");
            b.append(obj);
        }

        b.append(" target=");
        b.append(target.getClass().getName());
    } else {
        b.append(" barrier=");
        b.append(arg1);
    }

    b.append(" }");
    return b.toString();
}
 
开发者ID:wzx54321,项目名称:XinFramework,代码行数:40,代码来源:PresenterMessage.java

示例4: dump

import android.support.v4.util.TimeUtils; //导入依赖的package包/类
public void dump(String paramString, FileDescriptor paramFileDescriptor, PrintWriter paramPrintWriter, String[] paramArrayOfString)
{
  super.dump(paramString, paramFileDescriptor, paramPrintWriter, paramArrayOfString);
  if (this.mTask != null)
  {
    paramPrintWriter.print(paramString);
    paramPrintWriter.print("mTask=");
    paramPrintWriter.print(this.mTask);
    paramPrintWriter.print(" waiting=");
    paramPrintWriter.println(this.mTask.waiting);
  }
  if (this.mCancellingTask != null)
  {
    paramPrintWriter.print(paramString);
    paramPrintWriter.print("mCancellingTask=");
    paramPrintWriter.print(this.mCancellingTask);
    paramPrintWriter.print(" waiting=");
    paramPrintWriter.println(this.mCancellingTask.waiting);
  }
  if (this.mUpdateThrottle != 0L)
  {
    paramPrintWriter.print(paramString);
    paramPrintWriter.print("mUpdateThrottle=");
    TimeUtils.formatDuration(this.mUpdateThrottle, paramPrintWriter);
    paramPrintWriter.print(" mLastLoadCompleteTime=");
    TimeUtils.formatDuration(this.mLastLoadCompleteTime, SystemClock.uptimeMillis(), paramPrintWriter);
    paramPrintWriter.println();
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:30,代码来源:AsyncTaskLoader.java

示例5: dump

import android.support.v4.util.TimeUtils; //导入依赖的package包/类
public void dump(String s, FileDescriptor filedescriptor, PrintWriter printwriter, String as[])
{
    super.dump(s, filedescriptor, printwriter, as);
    if (c != null)
    {
        printwriter.print(s);
        printwriter.print("mTask=");
        printwriter.print(c);
        printwriter.print(" waiting=");
        printwriter.println(c.b);
    }
    if (d != null)
    {
        printwriter.print(s);
        printwriter.print("mCancellingTask=");
        printwriter.print(d);
        printwriter.print(" waiting=");
        printwriter.println(d.b);
    }
    if (e != 0L)
    {
        printwriter.print(s);
        printwriter.print("mUpdateThrottle=");
        TimeUtils.formatDuration(e, printwriter);
        printwriter.print(" mLastLoadCompleteTime=");
        TimeUtils.formatDuration(f, SystemClock.uptimeMillis(), printwriter);
        printwriter.println();
    }
}
 
开发者ID:vishnudevk,项目名称:MiBandDecompiled,代码行数:30,代码来源:AsyncTaskLoader.java

示例6: dump

import android.support.v4.util.TimeUtils; //导入依赖的package包/类
public void dump(String s, FileDescriptor filedescriptor, PrintWriter printwriter, String as[])
{
    super.dump(s, filedescriptor, printwriter, as);
    if (mTask != null)
    {
        printwriter.print(s);
        printwriter.print("mTask=");
        printwriter.print(mTask);
        printwriter.print(" waiting=");
        printwriter.println(mTask.waiting);
    }
    if (mCancellingTask != null)
    {
        printwriter.print(s);
        printwriter.print("mCancellingTask=");
        printwriter.print(mCancellingTask);
        printwriter.print(" waiting=");
        printwriter.println(mCancellingTask.waiting);
    }
    if (mUpdateThrottle != 0L)
    {
        printwriter.print(s);
        printwriter.print("mUpdateThrottle=");
        TimeUtils.formatDuration(mUpdateThrottle, printwriter);
        printwriter.print(" mLastLoadCompleteTime=");
        TimeUtils.formatDuration(mLastLoadCompleteTime, SystemClock.uptimeMillis(), printwriter);
        printwriter.println();
    }
}
 
开发者ID:Hamz-a,项目名称:MyCTFWriteUps,代码行数:30,代码来源:AsyncTaskLoader.java

示例7: toString

import android.support.v4.util.TimeUtils; //导入依赖的package包/类
@Override
public String toString() {
    StringBuilder result = new StringBuilder();
    result.append("MediaSessionStatus{ ");
    result.append("timestamp=");
    TimeUtils.formatDuration(SystemClock.elapsedRealtime() - getTimestamp(), result);
    result.append(" ms ago");
    result.append(", sessionState=").append(sessionStateToString(getSessionState()));
    result.append(", queuePaused=").append(isQueuePaused());
    result.append(", extras=").append(getExtras());
    result.append(" }");
    return result.toString();
}
 
开发者ID:commonsguy,项目名称:cwac-mediarouter,代码行数:14,代码来源:MediaSessionStatus.java

示例8: toString

import android.support.v4.util.TimeUtils; //导入依赖的package包/类
@Override
public String toString() {
    StringBuilder result = new StringBuilder();
    result.append("MediaItemStatus{ ");
    result.append("timestamp=");
    TimeUtils.formatDuration(SystemClock.elapsedRealtime() - getTimestamp(), result);
    result.append(" ms ago");
    result.append(", playbackState=").append(playbackStateToString(getPlaybackState()));
    result.append(", contentPosition=").append(getContentPosition());
    result.append(", contentDuration=").append(getContentDuration());
    result.append(", extras=").append(getExtras());
    result.append(" }");
    return result.toString();
}
 
开发者ID:commonsguy,项目名称:cwac-mediarouter,代码行数:15,代码来源:MediaItemStatus.java

示例9: getResult

import android.support.v4.util.TimeUtils; //导入依赖的package包/类
public String getResult() {
	StringBuilder stringBuilder = new StringBuilder();
	TimeUtils.formatDuration(msec, stringBuilder);
	return stringBuilder.toString();
}
 
开发者ID:bobroalexandr,项目名称:GenericDao,代码行数:6,代码来源:TimeMeasure.java


注:本文中的android.support.v4.util.TimeUtils类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。