This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
GreenGoo
wrote ...
2013/5/24
Scenario speed
GreenGoo
2013/5/24
#
What is the maximum speed (the number of times the act() method is called) of a scenario?
davmac
2013/5/24
#
There is no maximum. If you put the speed slider to its highest setting, the scenario will run as fast as your computer can run it.
GreenGoo
2013/5/24
#
Okay. Is there any way of finding out how many times the act() method is called per second?
davmac
2013/5/25
#
You can measure it. Use System.currentTimeMillis() to count passing time, and count the number of act cycles until one second is up. Why do you want to do this?
GreenGoo
2013/5/25
#
I want to make things happen for a specific number of seconds, instead of a arbitrary number of act cycles. I'll use System.currentTimeMillis().
You need to login to post a reply.
X