{"id":23066429,"url":"https://github.com/xjine/unity_stopwatch","last_synced_at":"2026-05-19T19:32:24.807Z","repository":{"id":39364490,"uuid":"149589047","full_name":"XJINE/Unity_Stopwatch","owner":"XJINE","description":"Utility to measure performance of small action/function or continuous codes.","archived":false,"fork":false,"pushed_at":"2022-06-24T07:15:00.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-05T06:38:31.040Z","etag":null,"topics":["assets","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XJINE.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":"2018-09-20T10:00:20.000Z","updated_at":"2022-06-24T06:59:31.000Z","dependencies_parsed_at":"2022-09-13T13:52:46.013Z","dependency_job_id":null,"html_url":"https://github.com/XJINE/Unity_Stopwatch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/XJINE/Unity_Stopwatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_Stopwatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_Stopwatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_Stopwatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_Stopwatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XJINE","download_url":"https://codeload.github.com/XJINE/Unity_Stopwatch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_Stopwatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33229365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T15:49:41.270Z","status":"ssl_error","status_checked_at":"2026-05-19T15:49:22.917Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["assets","unity"],"created_at":"2024-12-16T05:13:18.376Z","updated_at":"2026-05-19T19:32:21.052Z","avatar_url":"https://github.com/XJINE.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity_Stopwatch\n\nUtility to measure performance of small action/function or continuous codes.\n\nNOTE:\nThis is not depends on Unity. Main codes is able to works on native C#.\n\n## Importing\n\nYou can use Package Manager or import it directly.\n\n```\nhttps://github.com/XJINE/Unity_Stopwatch.git?path=Assets/Packages/Stopwatch\n```\n\n## How to Use\n\n``MeasureAction`` method is the easiest way to measure action.\nPass an action and the iteration count, it will returns the time of the action.\n\n```csharp\nDebug.Log(Stopwatch.MeasureAction(delegate ()\n{\n    var transform = base.transform;\n},\nloopCount).TotalMilliseconds);\n```\nIf you pass ``true`` as third argument, the result will shows average time.\n\n\nYou can use 3 methods to get more strict time. ``Start``, ``Stop`` and ``Restart``.\n\n```csharp\n\nStopwatch.Restart();\n\nfor (int i = 0; i \u003c loopCount; i++)\n{\n    var transform = base.transform;\n}\n\nStopwatch.Stop();\n\nDebug.Log(Stopwatch.Ellapsed.TotalMilliseconds);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxjine%2Funity_stopwatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxjine%2Funity_stopwatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxjine%2Funity_stopwatch/lists"}