Mac computer won't use java.lang.Thread.sleep command

조회 수: 8 (최근 30일)
Chris Wreden
Chris Wreden 2017년 1월 10일
댓글: Chris Wreden 2017년 1월 10일
When I use the command "java.lang.thread.sleep" on my iMac I get "No method 'sleep' with matching signature found for class 'java.lang.Thread'."
  댓글 수: 1
Jan
Jan 2017년 1월 10일
Please provide the code exactly as you have typed it. Currently we have to guess, which argument you pass to this command.

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2017년 1월 10일
편집: Jan 2017년 1월 10일
You can call this command like this:
java.lang.Thread.sleep(duration*1000)
Did you include the time?
  댓글 수: 1
Chris Wreden
Chris Wreden 2017년 1월 10일
The problem is I kept "duration" in the command without assigning it. Exceedingly stupid mistake that is now for public viewing. I got the idea to use this command from a previous post of yours. Thanks for everything.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by