All Projects → chrisguttandin → timing-object

chrisguttandin / timing-object

Licence: MIT license
An implementation of the timing object specification.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
shell
77523 projects

Projects that are alternatives of or similar to timing-object

timing-provider
An implementation of the timing provider specification.
Stars: ✭ 14 (-44%)
Mutual labels:  synchronisation, timing, timing-object, timing-provider, timingsrc, webtiming
Joplin
Joplin - an open source note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS. Forum: https://discourse.joplinapp.org/
Stars: ✭ 26,916 (+107564%)
Mutual labels:  synchronisation
minstant
Performant time measuring in Rust
Stars: ✭ 109 (+336%)
Mutual labels:  timing
ycecream
Sweeter debugging and benchmarking Python programs.
Stars: ✭ 38 (+52%)
Mutual labels:  timing
elapsedMillis
Arduino 'port' of the elapsedMillis library
Stars: ✭ 67 (+168%)
Mutual labels:  timing
sync
The main repository for P2P-Sync
Stars: ✭ 15 (-40%)
Mutual labels:  synchronisation
SAMD TimerInterrupt
This library enables you to use Interrupt from Hardware Timers on an SAMD-based board. These SAMD Hardware Timers, using Interrupt, still work even if other functions are blocking. Moreover, they are much more precise (certainly depending on clock frequency accuracy) than other software timers using millis() or micros(). That's mandatory if you …
Stars: ✭ 28 (+12%)
Mutual labels:  timing
guide.encode.moe
A guide for fansubbing
Stars: ✭ 123 (+392%)
Mutual labels:  timing
dvbcss-synctiming
Measuring synchronisation timing accuracy for DVB Compainion Screen Synchronisation TVs and Companions
Stars: ✭ 17 (-32%)
Mutual labels:  synchronisation
clock
High-resolution clock functions: monotonic, realtime, cputime.
Stars: ✭ 52 (+108%)
Mutual labels:  timing
alfred-timing
⏳ Alfred workflow for Timing app
Stars: ✭ 21 (-16%)
Mutual labels:  timing
kokkos-tools
Kokkos C++ Performance Portability Programming EcoSystem: Profiling and Debugging Tools
Stars: ✭ 52 (+108%)
Mutual labels:  timing
JFileSync3
File Syncing with encryption and compression (partly) compatible with encfs / boxcryptor (classic) volumes for local folders and WebDAV backends. Based on JFileSync - hence the name.
Stars: ✭ 20 (-20%)
Mutual labels:  synchronisation
about-time
A cool helper for tracking time and throughput of code blocks, with beautiful human friendly renditions.
Stars: ✭ 36 (+44%)
Mutual labels:  timing
STM32 TimerInterrupt
This library enables you to use Interrupt from Hardware Timers on an STM32F/L/H/G/WB/MP1-based board. These STM32F/L/H/G/WB/MP1 Hardware Timers, using Interrupt, still work even if other functions are blocking. Moreover, they are much more precise (certainly depending on clock frequency accuracy) than other software timers using millis() or micr…
Stars: ✭ 27 (+8%)
Mutual labels:  timing
ptScheduler
Pretty tiny Scheduler or ptScheduler is an Arduino library for writing non-blocking periodic tasks easily.
Stars: ✭ 14 (-44%)
Mutual labels:  timing
bea-content-sync-fusion
Synchronize contents across your Multisite.
Stars: ✭ 41 (+64%)
Mutual labels:  synchronisation
EasyProfiler
This repo, provides query profiler for .Net
Stars: ✭ 99 (+296%)
Mutual labels:  timing
client-timing
An HTTP client for go-server-timing middleware. Enables automatic timing propagation through HTTP calls between servers.
Stars: ✭ 23 (-8%)
Mutual labels:  timing
cdc
Repository gathering basic modules for CDC purpose
Stars: ✭ 30 (+20%)
Mutual labels:  timing

timing-object

An implementation of the timing object specification.

version

This is a standalone implementation of the TimingObject. It comes with an extensive set of tests. It is written in TypeScript and exposes its types but that's completely optional.

Installation

This package is available on npm. Run the following command to install it:

npm install timing-object

TimingObject class

The TimingObject class can be accessed like this.

import { TimingObject } from 'timing-object';

The TimingObject implements the spec with one notable difference as mentioned below.

timeupdate event

The timeupdate event is not implemented.

According to the spec it should emit "periodically with [a] fixed frequency [of] 5Hz". Unfortunately there is no way to emit an event in the browser with a constant frequency. Even if it would be possible it would probably only work for very few use cases. For the most part it will either emit too often or not often enough.

Let's say the timeupdate should be used to update the user interface. Modern browsers refresh the screen about 60 times per second. Thus an event that emits only 5 times a second will not emit often enough to update the screen every frame. The better alternative is to use requestAnimationFrame(). It can be used to schedule a function which runs once per animation frame (at approximately 60Hz).

import { TimingObject } from 'timing-object';

const timingObject = new TimingObject();

requestAnimationFrame(function updateUI() {
    const vector = timingObject.query();

    // ... do something with the vector ...

    requestAnimationFrame(updateUI);
});

ITimingProvider interface

Additionally the exported ITimingProvider interface can be used to implement a compatible TimingProvider.

import { ITimingProvider, TimingObject } from 'timing-object';

class MyCrazyTimingProvider implements ITimingProvider {
    // ... your implementation ...
}

One example of such a TimingProvider is the timing-provider package. It uses WebRTC as the underlying communication channel.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].