DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
long currentTime = System.currentTimeMilliscurrentSystemTimeMillis(); // If currentTime is before startTime, return the difference between startTime and currentTime if (currentTime < startTime) { return startTime - currentTime; } // Calculate how many intervals have passed since startTime long elapsedTime = currentTime - startTime; // Calculate how many full intervals have passed long intervalsPassed = elapsedTime / interval; // Calculate the time of the next trigger time long nextTriggerTime = startTime + (intervalsPassed + 1) * interval; // If the current time is already a trigger time, return 0 return nextTriggerTime - currentTime; |
...