{"id":18677235,"url":"https://github.com/elixir-toniq/hlclock","last_synced_at":"2026-03-16T16:39:53.346Z","repository":{"id":57505106,"uuid":"100718206","full_name":"elixir-toniq/hlclock","owner":"elixir-toniq","description":"Hybrid Logical Clocks for Elixir","archived":false,"fork":false,"pushed_at":"2019-10-04T15:21:15.000Z","size":88,"stargazers_count":49,"open_issues_count":3,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-16T19:53:21.182Z","etag":null,"topics":["distributed-systems","elixir","hybrid-logical-clocks"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elixir-toniq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-18T14:08:16.000Z","updated_at":"2024-03-06T10:31:00.000Z","dependencies_parsed_at":"2022-09-26T17:51:26.642Z","dependency_job_id":null,"html_url":"https://github.com/elixir-toniq/hlclock","commit_stats":null,"previous_names":["toniqsystems/hlclock"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-toniq%2Fhlclock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-toniq%2Fhlclock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-toniq%2Fhlclock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-toniq%2Fhlclock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-toniq","download_url":"https://codeload.github.com/elixir-toniq/hlclock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248506936,"owners_count":21115512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distributed-systems","elixir","hybrid-logical-clocks"],"created_at":"2024-11-07T09:33:00.675Z","updated_at":"2026-03-16T16:39:53.248Z","avatar_url":"https://github.com/elixir-toniq.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HLClock\n\n[![Build Status](https://travis-ci.org/toniqsystems/hlclock.svg?branch=master)](https://travis-ci.org/toniqsystems/hlclock) [![Hex pm](http://img.shields.io/hexpm/v/hlclock.svg?style=flat)](https://hex.pm/packages/hlclock)\n\n## About\n\nHybrid Logical Clocks (HLC) provide a one-way causality detection using a\ncombination of logical time and physical NTP timestamp. This library adds an\nadditional mechanism for resolving conflicts between timestamps by adding a\nunique node id to each HLC timestamp.\n\nThese timestamps can be used in place of standard NTP timestamps in order to\nprovide consistent snapshots and causality tracking. HLCs have a fixed space\nrequirement and are bounded close to physical timestamps.\n\n## Installation\n\nFirst, add `HLClock` to your `mix.exs` dependencies.\n\n```elixir\ndef deps do\n  [{:hlclock, \"~\u003e 1.0\"}]\nend\n```\n\n## Usage\n\nStarting in version 1.0.0, the `HLClock.Server` is not started as an application\nautomatically. `HLClock.start_link/1` is as a short cut to manually start a process:\n\n```elixir\n{:ok, clock} = HLClock.start_link()\n{:ok, ts} = HLClock.send_timestamp(clock)\n```\n\nIn practice, it is best to have a single `HLClock` running on any given node.\nToward that end, `HLClock` also provides a `child_spec` that accepts all\nstandard `GenServer` opts:\n\n```elixir\nchildren = [\n  {HLClock, name: :my_hlc_server},\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-toniq%2Fhlclock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-toniq%2Fhlclock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-toniq%2Fhlclock/lists"}