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

9 次查看(过去 30 天)
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