public synchronized void duration(long pause, Context ctxt,
			ILexLocation location)
	{
		// Wait until pause has passed - called by thread

		if (!inOuterTimeStep)
		{
			setTimestep(pause);
			durationEnd = SystemClock.getWallTime() + pause;

			do
			{
				if (Properties.diags_timestep)
				{
					RTLogger.log(new RTExtendedTextMessage(String.format("-- %s Waiting to move time by %d", this, timestep)));
				}

				waitUntilState(RunState.TIMESTEP, RunState.RUNNING, ctxt, location);
				setTimestep(durationEnd - SystemClock.getWallTime());
			} while (getTimestep() > 0);

			setTimestep(Long.MAX_VALUE); // Finished
		}
	}
public synchronized void duration ( long pause , Context ctxt , ILexLocation location ) { if ( ! inOuterTimeStep ) { setTimestep ( pause ) ; durationEnd = SystemClock . getWallTime ( ) + pause ; do { if ( Properties . diags_timestep ) { RTLogger . log ( new RTExtendedTextMessage ( String . format ( "-- %s Waiting to move time by %d" , this , timestep ) ) ) ; } waitUntilState ( RunState . TIMESTEP , RunState . RUNNING , ctxt , location ) ; setTimestep ( durationEnd - SystemClock . getWallTime ( ) ) ; } while ( getTimestep ( ) > 0 ) ; setTimestep ( Long . MAX_VALUE ) ; } }
/*
(non-Javadoc)
@see org.overture.vdmj.scheduler.ISchedulableThread#duration(long, org.overture.vdmj.runtime.Context,
org.overture.vdmj.lex.ILexLocation)