Commit 2e44e5b5 authored by Florian Pausch's avatar Florian Pausch

removed bug in ita_pause.m

parent 7fc3b5c6
function [] = ita_pause( seconds ) function ita_pause( seconds )
% ita_pause pauses (sleeps) for given time (units in seconds) % ita_pause pauses (sleeps) for given time (units in seconds)
java.util.concurrent.locks.LockSupport.park( seconds * 1e9 ) ); java.util.concurrent.locks.LockSupport.parkNanos( seconds * 1e9 );
end end
function [] = ita_pause_ms( milli_seconds ) function ita_pause_ms( milli_seconds )
% ita_pause_ms pauses (sleeps) for given time (units in milliseconds) % ita_pause_ms pauses (sleeps) for given time (units in milliseconds)
java.util.concurrent.locks.LockSupport.parkNanos( milli_seconds * 1e6 ); java.util.concurrent.locks.LockSupport.parkNanos( milli_seconds * 1e6 );
end end
function [] = ita_pause_ns( nano_seconds ) function ita_pause_ns( nano_seconds )
% ita_pause_ns pauses (sleeps) for given time (units in nanoseconds) % ita_pause_ns pauses (sleeps) for given time (units in nanoseconds)
java.util.concurrent.locks.LockSupport.parkNanos( nano_seconds ); java.util.concurrent.locks.LockSupport.parkNanos( nano_seconds );
end end
function [] = ita_pause_us( micro_seconds ) function ita_pause_us( micro_seconds )
% ita_pause_us pauses (sleeps) for given time (units in micro seconds) % ita_pause_us pauses (sleeps) for given time (units in micro seconds)
java.util.concurrent.locks.LockSupport.parkNanos( micro_seconds * 1e3 ); java.util.concurrent.locks.LockSupport.parkNanos( micro_seconds * 1e3 );
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment