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

2 Ansichten (letzte 30 Tage)
Chris Wreden
Chris Wreden am 10 Jan. 2017
Kommentiert: Chris Wreden am 10 Jan. 2017
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 Kommentar
Jan
Jan am 10 Jan. 2017
Please provide the code exactly as you have typed it. Currently we have to guess, which argument you pass to this command.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Jan
Jan am 10 Jan. 2017
Bearbeitet: Jan am 10 Jan. 2017
You can call this command like this:
java.lang.Thread.sleep(duration*1000)
Did you include the time?
  1 Kommentar
Chris Wreden
Chris Wreden am 10 Jan. 2017
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by