{"id":18474724,"url":"https://github.com/erlite/networktimesync","last_synced_at":"2025-10-09T18:17:00.037Z","repository":{"id":103781842,"uuid":"494514150","full_name":"Erlite/NetworkTimeSync","owner":"Erlite","description":"A simple Unreal Engine subsystem to provide a more accurate server world time to clients.","archived":false,"fork":false,"pushed_at":"2023-03-27T23:12:57.000Z","size":31,"stargazers_count":20,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T12:51:11.388Z","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/Erlite.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2022-05-20T15:21:39.000Z","updated_at":"2025-03-20T10:34:47.000Z","dependencies_parsed_at":"2024-01-14T11:08:43.392Z","dependency_job_id":null,"html_url":"https://github.com/Erlite/NetworkTimeSync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erlite%2FNetworkTimeSync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erlite%2FNetworkTimeSync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erlite%2FNetworkTimeSync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erlite%2FNetworkTimeSync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Erlite","download_url":"https://codeload.github.com/Erlite/NetworkTimeSync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247851748,"owners_count":21006811,"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-06T10:30:33.005Z","updated_at":"2025-10-09T18:16:55.017Z","avatar_url":"https://github.com/Erlite.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# NetworkTimeSync\n\n \n\nA simple C++ (and Blueprint compatible) plugin that aims to provide a more accurate server world time to clients.\n\n## Installation\n\nSimply place the contents of this repository in a `Plugins/NetworkTimeSync/` folder of your project.\n\nYou must then enable the plugin in your Project Settings, and in your `ProjectName.Build.cs` file.\n\n```cs\nPublicDependencyModuleNames.Add(\"NetworkTimeSync\");\n```\n\nOnce compiled and enabled, simply add the `UNetworkTimeSyncComponent` to your Player Controller. This component will be in charge of synchronizing network time, every 10 seconds by default.\n\n![image](https://user-images.githubusercontent.com/25248023/169562656-6253804e-c176-496e-aa28-5ba9b9afb97e.png)\n\n\n## Usage\n\nThe `NetworkTimeSubsystem` is a GameInstance subsystem, which will contain the latest server world time.\nYou can access it in C++ via the GameInstance, or by using the static provided:\n\n```cpp\n// via the GameInstance\nif (UGameInstance* GI = GetWorld()-\u003eGetGameInstance())\n{\n  UNetworkTimeSubsystem* NetworkTime = GI-\u003eGetSubsystem\u003cUNetworkTimeSubsystem\u003e();\n  const float ServerTime = NetworkTime-\u003eGetServerWorldTime();\n}\n\n// or, you can use the static with a world context object.\nUNetworkTimeSubsystem* NetworkTime = UNetworkTimeSubsystem::Get(this);\n// May return null with an invalid world context object.\nif (NetworkTime)\n{\n  const float ServerTime = NetworkTime-\u003eGetServerWorldTime();\n}\n```\n\nFor Blueprints, you can simply access it via the generated node:\n\n![image](https://user-images.githubusercontent.com/25248023/169562756-5a5710e7-eb52-40ee-a8cb-47fb732b52ab.png)\n\nAll you have to do is replace any calls to the GameState's `GetServerWorldTimeSeconds()` function with this one.\n\n## Configuration\n\nYou can configure the synchronization interval in your Project Settings.\n\nBy default, it will reliably synchronize every ten seconds. You may want to increase or decrease that interval based on your preference.\n\n\u003e Warning: if you decrease the interval for it to synchronize very often, enable `Use Unreliable RPCs` to avoid saturating your bandwidth with RPCs.\n\n![image](https://user-images.githubusercontent.com/25248023/169563307-fdc768b3-020f-4e75-9f29-3a9a753a5ca8.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferlite%2Fnetworktimesync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferlite%2Fnetworktimesync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferlite%2Fnetworktimesync/lists"}