Java Second Get currentTimeSeconds()

Here you can find the source of currentTimeSeconds()

Description

current Time Seconds

License

LGPL

Declaration

public static long currentTimeSeconds() 

Method Source Code

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

public class Main {
    private static int timeZoneOffset = 0;

    public static long currentTimeSeconds() {
        return currentTimeMillis() / 1000L;
    }/* ww w. j a  v a 2  s . co m*/

    public static long currentTimeMillis(boolean timezone) {
        if (timezone)
            return System.currentTimeMillis() + (long) timeZoneOffset;
        else
            return System.currentTimeMillis();
    }

    public static long currentTimeMillis() {
        return System.currentTimeMillis() + (long) timeZoneOffset;
    }

    public static long currentTimeMillis(long time) {
        return time + (long) timeZoneOffset;
    }
}

Related

  1. currentTimeInSeconds()
  2. currentTimePlusNSeconds(long n)
  3. currentTimeSecond()
  4. currentTimeSecond()
  5. currentTimeSeconds()
  6. currentTimeSeconds()
  7. getClockSkewInSeconds()
  8. getCronBySecondScheduler(int second)
  9. getCurrentMiliseconds()