Git Product home page Git Product logo

Comments (3)

mattjohnsonpint avatar mattjohnsonpint commented on July 26, 2024

There are several use cases. The main one, however, is that of interoperability. JavaScript interacts with data from many other platforms. We should be able to round-trip data that contains nanoseconds without any truncation or lossyness. This also helps for platforms that present data with other sub-millisecond units, such as microseconds or the 100-ns "ticks" used in .NET.

I'll add some more as I come across them. Do understand that we are talking about the case for this precision, which is a separate concept from accuracy. Only the host environment can address accuracy, and it's likely to vary significantly across hardware and OS.

from proposal-temporal.

ig3 avatar ig3 commented on July 26, 2024

Are you concerned with nanosecond precision or nanosecond resolution?

Ideally, one would have both but it seems to me that resolution is a characteristic of the temporal time types while precision is a characteristic of the source of the value. To my sensibilities, a single value has resolution and accuracy but precision is an attribute of a time source and can only be experienced or assessed with a collection of values. Or am I missing your point or meaning?

ntp.org has an overview of clock quality that seems relevant, though their description of precision seems conflicted, with two inconsistent definitions. I also quite like the Precision, Accuracy and Resolution page by Dave Tutelman.

I was long frustrated by systems that had only one second resolution and, with the speed of computers these days, now even millisecond resolution seems a handicap. There can be many events in a millisecond and without finer resolution, no way to record when they happened and put them in order. Not that the accuracy and precision of clocks on different systems are not still an even greater problem but it is nice to have data types that aren't the limiting factor.

from proposal-temporal.

mattjohnsonpint avatar mattjohnsonpint commented on July 26, 2024

@ig3 - We are primarily talking about the resolution of the data supported in the data structures. I have updated the title of this issue accordingly.

Using the definitions from Dave's page, we aren't really in a position to address precision or accuracy at all. Those are qualities of the host environment. The best we can do is to offer a data structure that can hold data with nanoseconds without losing them, and to expose any underlying functionality for getting the current system time with the highest resolution possible.

from proposal-temporal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.