I am looking at the Date documentation and trying to figure out how I can express NOW + 5 seconds. Here\'s some pseudocode:
import java.util.Date
public clas
You can use:
now.setTime(now.getTime() + 5000);
Date.getTime() and setTime() always refer to milliseconds since January 1st 1970 12am UTC.
However, I would strongly advise you to use Joda Time if you're doing anything more than the very simplest of date/time handling. It's a much more capable and friendly library than the built-in support in Java.
DateTime later = DateTime.now().plusSeconds( 5 );
Joda-Time later inspired the new java.time package built into Java 8.