Java Utililty Methods Second Get

List of utility methods to do Second Get

Description

The list of methods to do Second Get are organized into topic(s).

Method

longcurrentTimeAsSeconds()
current Time As Seconds
return System.currentTimeMillis() / 1000;
longcurrentTimeInSeconds()
current Time In Seconds
return System.currentTimeMillis() / 1000;
longcurrentTimePlusNSeconds(long n)
current Time Plus N Seconds
return currentTimeSeconds() + n;
longcurrentTimeSecond()
Gets the current time, rounded down to the closest second.
return roundToSecond(System.currentTimeMillis());
intcurrentTimeSecond()
current Time Second
return Long.valueOf(System.currentTimeMillis() / 1000).intValue();
longcurrentTimeSeconds()
current Time Seconds
return currentTimeMillis() / 1000L;
longcurrentTimeSeconds()
A method to get the unix time...
return (System.currentTimeMillis() / 1000);
longcurrentTimeSeconds()
Gets a unix timestamp in seconds.
return (System.currentTimeMillis() / ONE_SECOND_IN_MILLISECONDS);
intgetClockSkewInSeconds()
Get the server synchronization tolerance value in seconds.
return 0;
StringgetCronBySecondScheduler(int second)
get Cron By Second Scheduler
if (second >= (24 * 60 * 60) || second == 0) {
    return null;
int hh = 0;
if (second >= 3600) {
    hh = second / 3600;
    second = second - (hh * 3600);
int mm = second / 60;
int ss = second % 60;
return (ss == 0 ? "0" : ("*/" + ss))
        + (mm == 0 ? (ss == 0 ? (hh == 0 ? (" *") : " 0") : (hh == 0 ? " *" : " 0")) : (" */" + mm))
        + (hh == 0 ? " *" : (" */" + hh)) + " * * ?";