{"id":24488193,"url":"https://github.com/codiepp/ml-cpp-chrono","last_synced_at":"2026-05-16T09:35:31.446Z","repository":{"id":117956177,"uuid":"532238710","full_name":"CodiePP/ml-cpp-chrono","owner":"CodiePP","description":"OCaml embedded cross-platform C++ \u003cchrono\u003e","archived":false,"fork":false,"pushed_at":"2023-04-17T19:00:24.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T14:40:42.573Z","etag":null,"topics":["chrono","cpp","hacktoberfest","ocaml"],"latest_commit_sha":null,"homepage":"","language":"C++","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/CodiePP.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"codiepp"}},"created_at":"2022-09-03T11:23:12.000Z","updated_at":"2022-09-12T20:12:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"b327a559-82d8-41b0-86f4-7177688def8b","html_url":"https://github.com/CodiePP/ml-cpp-chrono","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodiePP/ml-cpp-chrono","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodiePP%2Fml-cpp-chrono","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodiePP%2Fml-cpp-chrono/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodiePP%2Fml-cpp-chrono/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodiePP%2Fml-cpp-chrono/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodiePP","download_url":"https://codeload.github.com/CodiePP/ml-cpp-chrono/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodiePP%2Fml-cpp-chrono/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33097023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["chrono","cpp","hacktoberfest","ocaml"],"created_at":"2025-01-21T16:18:48.717Z","updated_at":"2026-05-16T09:35:31.438Z","avatar_url":"https://github.com/CodiePP.png","language":"C++","funding_links":["https://github.com/sponsors/codiepp"],"categories":[],"sub_categories":[],"readme":"# ml-cpp-chrono\nOCaml embedded cross-platform C++ \u0026lt;[chrono](https://en.cppreference.com/w/cpp/chrono)\u003e\n\n\n## build it\n\n`dune build`\n\n\n## run the demo\n\n`dune exec mlCppChrono`\n\n\n## run the tests\n\n`dune runtest`\n\n## the interface\n\n```OCaml\ntype duration\n\nmodule Duration :\nsig\n    val to_string : duration -\u003e string\n    val to_int : duration -\u003e int\n    (* TODO  val ticks : duration -\u003e float *)\n    val int_to_ns : int -\u003e duration\n    val int_to_ms : int -\u003e duration\n    val int_to_s : int -\u003e duration\n    val int_to_m : int -\u003e duration\n    val int_to_h : int -\u003e duration\n    val int_to_d : int -\u003e duration\n    val int_to_w : int -\u003e duration\n    val cast_ns : duration -\u003e duration\n    val cast_ms : duration -\u003e duration\n    val cast_s  : duration -\u003e duration\n    val cast_m  : duration -\u003e duration\n    val cast_h  : duration -\u003e duration\n    val cast_d  : duration -\u003e duration\n    val cast_w  : duration -\u003e duration\n    val eq : duration -\u003e duration -\u003e bool\n    val lt : duration -\u003e duration -\u003e bool\n    val le : duration -\u003e duration -\u003e bool\n    val gt : duration -\u003e duration -\u003e bool\n    val ge : duration -\u003e duration -\u003e bool\n    val add : duration -\u003e duration -\u003e duration\nend\n\nmodule Clock :\nsig\n\nmodule type CLOCK =\nsig\n    type timepoint\n    val now : unit -\u003e timepoint\n    val to_sys_time : timepoint -\u003e float\n    (* compatible with Unix.time : seconds since 00:00 Jan-1 1970 *)\n    val diff : timepoint -\u003e timepoint -\u003e duration\n    (* returns the duration in nanoseconds *)\n\nend\n\nmodule System : CLOCK\n\nmodule Steady : CLOCK\n\nmodule Hires : CLOCK\n\nend (* Clock *)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodiepp%2Fml-cpp-chrono","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodiepp%2Fml-cpp-chrono","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodiepp%2Fml-cpp-chrono/lists"}