Java Duration Calculate seconds(Duration duration)

Here you can find the source of seconds(Duration duration)

Description

A helper method to get the seconds from a given duration.

License

Open Source License

Declaration

public static String seconds(Duration duration) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.time.Duration;

public class Main {
    /**/*from  w  ww . j a v a  2  s .  com*/
     * A helper method to get the seconds from a given duration.
     * Strings are needed for the variety of timeouts given for Workflow and Activities
     */
    public static String seconds(Duration duration) {
        return String.valueOf(duration.getSeconds());
    }
}

Related

  1. max(Duration a, Duration b)
  2. min(Duration a, Duration b)
  3. minutesToDuration(long minutes)
  4. multiply(Duration duration, double factor)
  5. runAfter(Duration duration, Runnable toRun)
  6. serializeDuration(Duration duration)
  7. sleep(Duration duration)
  8. sleep(final Duration duration)
  9. within( CompletableFuture future, Duration duration)