# Calculate clockwise speed based on time

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
• Hey guys,

I'm trying to make a clock, for this I have every 1000 milliseconds add 1 hour to the clock, so based on this I want to make the needle move smoothly so I needed to calculate how much (in degrees) the needle should move every 1 millisecond to rotate 360 degrees in 12000 milliseconds (12 seconds, which represents the 12 hours it takes for the needle to make a full turn).

To calculate it I did:

360 (degrees) / 12000 (milliseconds) = 0.03

Long version:
360 (degrees) / 12 (seconds, represents total hours) = 30 degrees per second
30 (degrees) / 1000 (milliseconds) = 0.03 degrees per millisecond

So the needle angle must subtract 0.03 every 1 millisecond from its current angle to make a full turn in 12000 milliseconds.

I think it's fine, but implementing it in Clickteam Fusion for some reason doesn't work.

This is the code:

Code
``````// Clock

* Every 1000
Hours : Add 1 to Counter

* Every 1
Needle: Set angle to Angle( "Needle" ) - 0.3``````

What am I doing wrong?

• Oh.... I see that the conditions "Every" and "Restrict actions" depend on the frame rate. Is there a way to fix it?
I can use another way to do what I need but I would like to know if these conditions can be made not to depend on the frame rate.

• Assuming you're using the in-engine clock, the expression editor lets you use timer to retrieve the game's runtime in milliseconds, like Please login to see this link.