clock-signal

Simple signal encapsulating the passage of time

Usage no npm install needed!

<script type="module">
  import clockSignal from 'https://cdn.skypack.dev/clock-signal';
</script>

README

Clock Signal

Useage of this is dead simple. Pick a time in your app to call the update function with your clock instance. This is intended to be done in your application's core update loop.

var c = new ClockSignal

function update () {
  ClockSignal.update(c)

  console.log(c.dT) // ~16.66
}