![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@colyseus/clock
Advanced tools
A simple clock/ticker implementation to track elapsed/delta time.
A simple clock/ticker implementation to track delta/elapsed time.
new Clock([useInterval=false])
clock.start([useInterval=false])
clock.stop()
clock.tick()
clock.elapsedTime
clock.deltaTime
clock.currentTime
There's two ways you can use clock.js: manual or automatic.
Automatic
By initializing Clock
with true
as the first argument, a interval will be
created, in which tick()
is called 60 times per second.
import Clock from '@colyseus/clock';
let clock = new Clock(true);
You can also call start(true)
to create the interval.
import Clock from '@colyseus/clock';
let clock = new Clock();
clock.start(true);
Manual usage
You call tick()
manually in your existing loop.
import Clock from '@colyseus/clock';
var clock = new Clock();
setInterval(function() {
clock.tick();
console.log("Delta time: ", clock.deltaTime);
console.log("Elapsed time: ", clock.elapsedTime);
console.log("Current time: ", clock.currentTime);
}, 1000 / 60);
MIT
FAQs
A simple clock/ticker implementation to track elapsed/delta time.
The npm package @colyseus/clock receives a total of 93 weekly downloads. As such, @colyseus/clock popularity was classified as not popular.
We found that @colyseus/clock demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.