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

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 日

0 投票

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 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

製品

質問済み:

2017 年 1 月 10 日

コメント済み:

2017 年 1 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by