TimeUnit toSeconds() method in Java with Examples
The toSeconds() method of TimeUnit Class is used to get the time represented by the TimeUnit object, as the number of Seconds, since midnight UTC on the 1st January 1970. Syntax: public long toSeconds(long duration) Parameters: This method accepts a mandatory parameter duration which is the duration