cc broken pocket watches
Creative Commons photo by jekemp

public class PreventTimeTravelers {
    public static void main(String args[]){
        long startTime = System.currentTimeMillis();
        long endTime = System.currentTimeMillis();
        assert endTime >= startTime: "We come back in time!";
    }
}

Please do not execute this code in a time machine.