returns the scheduled execution time of the most recent actual execution of this task . if this method is invoked while task execution is in progress , the return value is the scheduled execution time of the ongoing task execution . this method is typically invoked from within a task 's run method , to determine whether the current execution of the task is sufficiently timely to warrant performing the scheduled activity : public void run if system.currenttimemillis - scheduledexecutiontime > = max_tardiness return ; / / too late ; skip this execution . / / perform the task this method is typically not used in conjunction with fixed-delay execution repeating tasks , as their scheduled execution times are allowed to drift over time , and so are not terribly significant . concode_field_sep int SCHEDULED concode_elem_sep int CANCELLED concode_elem_sep int VIRGIN concode_elem_sep int EXECUTED concode_elem_sep long nextExecutionTime concode_elem_sep long period concode_elem_sep int state concode_elem_sep Object lock concode_field_sep boolean cancel concode_elem_sep void run
long function ( ) { synchronized ( lock ) { return ( period < 0 ? nextExecutionTime + period : nextExecutionTime - period ) ; } }