GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    mcc (mcc@mastodon.social)'s status on Friday, 15-Mar-2024 12:44:44 JST mcc mcc

    Me when I use a uint64_t to represent time in my application

    In conversation about a year ago from mastodon.social permalink

    Attachments


    1. https://files.mastodon.social/media_attachments/files/111/978/856/254/593/319/original/d1fc83c069a6fdbd.jpg
    • clacke likes this.
    • Embed this notice
      ✧✦Catherine✦✧ (whitequark@mastodon.social)'s status on Friday, 15-Mar-2024 12:44:51 JST ✧✦Catherine✦✧ ✧✦Catherine✦✧
      in reply to

      @mcc but is it seconds? nanoseconds? femtoseconds?

      in CXXRTL i use single femtoseconds as the timebase and boy, does 64-bit time look short when you do that

      (I ended up having a 128-bit cxxrtl::time that is converted to 64.64 fixed point when communicating to other applications)

      In conversation about a year ago permalink
      clacke likes this.
    • Embed this notice
      mcc (mcc@mastodon.social)'s status on Friday, 15-Mar-2024 12:44:55 JST mcc mcc
      in reply to
      • ✧✦Catherine✦✧

      @whitequark I actually worked this out and in order for a program launched in 2023 and tracking time in a 64-bit variable to create a problem in 3193, the time unit would have to be "ticks" of 4 nanoseconds. Additionally, you would need somewhere to cast the to an int64_t or otherwise subtract it in such a way the highest bit is assumed unset.

      In conversation about a year ago permalink
    • Embed this notice
      Richard Hendricks (hendric@astronomy.city)'s status on Friday, 15-Mar-2024 12:44:55 JST Richard Hendricks Richard Hendricks
      in reply to
      • ✧✦Catherine✦✧

      @mcc @whitequark ...pulls out my proposal to use 256 bit timers with Planck time ticks of 5e-44 s - good for 35 thousand trillion years!

      In conversation about a year ago permalink
      clacke likes this.
    • Embed this notice
      Farce Majeure (vathpela@better.boston)'s status on Friday, 15-Mar-2024 12:45:00 JST Farce Majeure Farce Majeure
      in reply to
      • ✧✦Catherine✦✧

      @mcc @whitequark ... Which sounds ridiculous, but the part of me that knows FAT filesystems have 2 second granularity knows someone will do it.

      In conversation about a year ago permalink
      clacke likes this.
    • Embed this notice
      Tom Forsyth (tomf@mastodon.gamedev.place)'s status on Friday, 15-Mar-2024 12:45:07 JST Tom Forsyth Tom Forsyth
      in reply to
      • ✧✦Catherine✦✧

      @mcc @whitequark Highly recommend you take a look at (and then steal) the NTP format:
      https://en.wikipedia.org/wiki/Network_Time_Protocol

      They also have a 128-bit version that seems... adequate:

      "enough to resolve the amount of time it takes a photon to pass an electron at the speed of light. [...] enough to provide unambiguous time representation until the universe goes dim."

      In conversation about a year ago permalink

      Attachments


      clacke likes this.
    • Embed this notice
      mcc (mcc@mastodon.social)'s status on Friday, 15-Mar-2024 12:45:13 JST mcc mcc
      in reply to

      Do this

      In conversation about a year ago permalink

      Attachments


      1. https://files.mastodon.social/media_attachments/files/112/097/357/118/134/922/original/d0a18d91864fc417.jpg
      clacke likes this.

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.