Sign in to follow this  

Rolls per second

This topic is 4074 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am retarded at math and need some help with a simple calculation. If a dice gets rolled 10,000,000 times in 2740 milliseconds, what is the rolls per second rate? Also, would it be a different calcuation if the milliseconds are under a second, eg, 1000 rolls in 345 milliseconds. What is the arithmetic to figure out rolls per second? Thanks :)

Share this post


Link to post
Share on other sites
This is pretty basic stuff.

Operations per second = Number of ops / number of seconds

There are 1000 milliseconds in a second, so 2740 ms = 2740/1000 secs, so there are

ms/1000 seconds in a millisecond.

So the answer is ops/(ms/1000)

i.e. 1000*op/ms

Beware integer division though, you will probably need to cast the arguments to float or double (assuming C/C++).

[EDIT: Corrected deliberate mistake :)]

[Edited by - Paradigm Shifter on October 21, 2006 4:33:52 AM]

Share this post


Link to post
Share on other sites

This topic is 4074 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this