List of utility methods to do Second
long | secondsAgo(int seconds) seconds Ago return now() - (seconds * SECOND);
|
int | secondsFromBeginningOfBoardcastEpoch() seconds From Beginning Of Boardcast Epoch return (int) ((System.currentTimeMillis() - BEGINNING_OF_BOARDCAST_TIME) / 1000); |
double | secondsSince(final long since) Returns the number of seconds since the given time return (System.currentTimeMillis() - since) / 1000.0;
|
String | secondToString(long second) second To String long sec = second % 60; second = second / 60; long min = second % 60; long hour = second = second / 60; String nowTime = new String(); if (hour < 10) { if (hour == 0) nowTime = "00"; ... |
long | stringToSeconds(String string) string To Seconds long seconds = 0; String[] values = string.split(":"); seconds = Long.parseLong(values[0]) * 3600 + Long.parseLong(values[1]) * 60 + Long.parseLong(values[2]); return seconds; |
int | strTimeToSeconds(String hmsTimes) str Time To Seconds int seconds = 0; String[] arrHMS = hmsTimes.split(":"); int h = Integer.parseInt(arrHMS[0]); int m = Integer.parseInt(arrHMS[1]); int s = Integer.parseInt(arrHMS[2]); seconds = h * 3600 + m * 60 + s; return seconds; |
int | ticksToSeconds(long ticks) Extracts the seconds component of a time in millisecond ticks. return (int) (ticks % MILLIS_PER_MINUTE) / MILLIS_PER_SECOND; |
long | ticksWithSecondsSetTo(long ticks, int seconds) Sets the seconds component of the timestamp, returning the new timestamp with updated component. long oldSeconds = ticksToSeconds(ticks); return ticks - (oldSeconds * MILLIS_PER_SECOND) + (seconds * MILLIS_PER_SECOND); |
double | timecents2seconds(int timecents) timecentsseconds if (timecents <= -32768) { return 0.0; return Math.pow(2.0, timecents / 1200.0); |
double | timeDecimalSeconds(String time) Time converter. return timeDecimal(time) * 3600;
|