Java TimeUnit Usage now()

Here you can find the source of now()

Description

now

License

Apache License

Declaration

private static long now() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Date;

import java.util.concurrent.TimeUnit;

public class Main {
    private static long now() {
        Date date = new Date();
        long b = TimeUnit.MILLISECONDS.toSeconds(date.getTime());
        return b;
    }/* ww w . j  a  v a  2 s  .co m*/
}

Related

  1. minutesSince(final long startNanos)
  2. nanoElapseToHumanReadable(final Long nanoElapse)
  3. nanosToHMSms(long nanos)
  4. nanosToSecs(long nanos)
  5. nanoToString(final long nanos)
  6. numberOfDaysSinceEpoch(long milliSinceEpoch)
  7. parseDate(String value)
  8. parseDuration(String durationStr)
  9. parseDuration(String text)