sleep/1 causes the calling thread to be suspended for the given number of seconds. Other threads will be unaffected.
?- sleep(0.3). % short sleep Yes (0.00s cpu). % appears after 0.3 seconds. ?- sleep(63072000). % long sleep Yes (0.00s cpu). % appears after 2 years. ?- engine_create(E,[thread]), engine_resume_thread(E, (sleep(3),writeln(sleep_done))), writeln(thread_started), engine_join(E, block, S). thread_started sleep_done % appears after 3 seconds Yes (0.00s cpu)