{"id":20105053,"url":"https://github.com/misyltoad/ephemeral","last_synced_at":"2026-05-24T16:31:44.958Z","repository":{"id":135968495,"uuid":"66868428","full_name":"misyltoad/Ephemeral","owner":"misyltoad","description":"A high-resolution cross-platform time library in C that supports sleeping and \"clocks\" that can be used to tell you if a certain time has passed since its start.","archived":false,"fork":false,"pushed_at":"2016-09-22T17:58:36.000Z","size":855,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T04:44:50.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/misyltoad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2016-08-29T18:13:54.000Z","updated_at":"2023-09-08T17:14:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc852218-7404-46cb-b30d-68ec2aadd2d4","html_url":"https://github.com/misyltoad/Ephemeral","commit_stats":null,"previous_names":["misyltoad/ephemeral"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misyltoad%2FEphemeral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misyltoad%2FEphemeral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misyltoad%2FEphemeral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misyltoad%2FEphemeral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/misyltoad","download_url":"https://codeload.github.com/misyltoad/Ephemeral/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241549061,"owners_count":19980474,"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":[],"created_at":"2024-11-13T17:45:42.222Z","updated_at":"2026-05-24T16:31:44.910Z","avatar_url":"https://github.com/misyltoad.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ephemeral\n## A simple time library in C.\n\n### Features\n* Getting high-resolution time.\n* Sleeping the current thread.\n* \"Clocks\" that can be used to see if a specific time has passed since their start or given value.\n* Tick counter with embedded clock.\n* Ease-of-use: Full documentation of every struct and function with Doxygen!\n* A nice licence. (MIT)\n* Debug overflow checking.\n* Speed.\n\n### Instructions\n#### Preparation\nYou may use the premake build system to generate a .sln file for your version of Visual Studio.\n\nTo compile in your own project so that you do not have to link, all you need to add the UnityBuild.c and it will sort out all of the platform specific stuff, that is all.\n\nIf you would like to initialise Ephemeral yourself, define EPHEMERAL_DISABLE_INITIALISERS and call Ephemeral_Init(). Calling Ephemeral_Init without EPHEMERAL_DISABLE_INITIALISERS is ***NOT*** required, but it shouldn't cause any issues.\n\nYou may disable assertions in by building in Release or defining EPHEMERAL_DISABLE_ASSERTS.\n#### Using\nEphemeral can be utilized in many different ways.\nOne example would be to use it in a game engine for getting delta-time:\n```c\n...\nEphemeral_TickCounter tc = Ephemeral_TickCounterCreate();\nEphemeral_Time prevTime = Ephemeral_TimeNow();\n\n// Sleep for 0.5s\nEphemeral_TimeSleep(Ephemeral_TimeFromMicroseconds(500));\n\nfor(;;)\n{\n\tEphemeral_Time currentTime = Ephemeral_TimeNow();\n\tEphemeral_Time deltaTime = Ephemeral_TimeMinus(currentTime, prevTime);\n\tprevTime = currentTime;\n\t...\n\tif (Ephemeral_TickCounterUpdate(\u0026tc, Ephemeral_TimeFromMilliseconds(500)))\n\t{\n\t\t// This would update every 500ms (0.5s).\n\t\tprintf(\"Your FPS is: %f\", tc.tickRate);\n\t\t// You could use it to get frame time also.\n\t\tprintf(\"Your frame time is: %f\", 1000.0f / (float)tc.tickRate);\n\t}\n\t...\n}\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisyltoad%2Fephemeral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisyltoad%2Fephemeral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisyltoad%2Fephemeral/lists"}