Here you can find the source of seconds(Duration duration)
public static String seconds(Duration duration)
//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()); } }