Java Code Examples for android.util.TimeUtils

The following are top voted examples for showing how to use android.util.TimeUtils. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: core-doppl   File:   Source Code and License 5 votes vote down vote up
String toString(long now) {
    StringBuilder   b = new StringBuilder();
    b.append("{ what=");

    b.append(" when=");
    TimeUtils.formatDuration(when-now, b);

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

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

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

    b.append(" }");
    return b.toString();