{"id":46040397,"url":"https://github.com/predatorray/timestone","last_synced_at":"2026-03-01T06:13:26.271Z","repository":{"id":304433126,"uuid":"1018713959","full_name":"predatorray/timestone","owner":"predatorray","description":"a Java library for abstracting time sources, enabling deterministic and testable time-dependent logic","archived":false,"fork":false,"pushed_at":"2025-07-23T04:43:37.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-23T06:18:46.684Z","etag":null,"topics":["java","multithreading","testing","time"],"latest_commit_sha":null,"homepage":"","language":"Java","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/predatorray.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,"zenodo":null}},"created_at":"2025-07-12T21:47:13.000Z","updated_at":"2025-07-23T04:43:38.000Z","dependencies_parsed_at":"2025-07-13T05:37:22.212Z","dependency_job_id":null,"html_url":"https://github.com/predatorray/timestone","commit_stats":null,"previous_names":["predatorray/timestone"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/predatorray/timestone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/predatorray%2Ftimestone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/predatorray%2Ftimestone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/predatorray%2Ftimestone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/predatorray%2Ftimestone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/predatorray","download_url":"https://codeload.github.com/predatorray/timestone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/predatorray%2Ftimestone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29962005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T05:59:08.471Z","status":"ssl_error","status_checked_at":"2026-03-01T05:58:04.208Z","response_time":124,"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":["java","multithreading","testing","time"],"created_at":"2026-03-01T06:13:25.698Z","updated_at":"2026-03-01T06:13:26.256Z","avatar_url":"https://github.com/predatorray.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Timestone\n\n[![License](https://img.shields.io/github/license/predatorray/timestone)][1]\n![Maven Central](https://img.shields.io/maven-central/v/io.github.predatorray/timestone-api)\n![GitHub release version](https://img.shields.io/github/v/release/predatorray/timestone)\n![Build Status](https://img.shields.io/github/actions/workflow/status/predatorray/timestone/ci.yml?branch=main)\n\nTimestone is a Java library for abstracting time sources, enabling deterministic and testable time-dependent logic.\nIt provides interfaces and implementations for system time and mutable time, compatible with Java's `Clock`.\n\n## Features\n\n- `Time` interface for accessing current time and sleeping.\n- `SystemTime` for real system clock.\n- `MutableTime` for controllable time in tests.\n- Seamless integration with Java's `Clock`.\n\n## Usage\n\nImport the Timestone API in your project.\n\nIf you're using Maven, add the following dependency to your `pom.xml`:\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eio.github.predatorray\u003c/groupId\u003e\n        \u003cartifactId\u003etimestone-api\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eio.github.predatorray\u003c/groupId\u003e\n        \u003cartifactId\u003etimestone-test\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.0\u003c/version\u003e\n        \u003cscope\u003etest\u003c/scope\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\nIf you're using Gradle, add the following to your `build.gradle`:\n```groovy\ndependencies {\n    implementation 'io.github.predatorray:timestone-api:1.0.0'\n    testImplementation 'io.github.predatorray:timestone-test:1.0.0'\n}\n```\n\n### For Production Code\n\n```java\n// Use system time\nimport io.github.predatorray.timestone.Time;\nimport io.github.predatorray.timestone.SystemTime;\n\nTime time = Time.SYSTEM;\n\nlong nowMillis = time.millis();\ntime.sleep(1000);\n```\n\n### For Unit Tests\n\n```java\n// Use mutable time in tests\nimport io.github.predatorray.timestone.test.MutableTime;\n\nMutableTime testTime = new MutableTime();\n\ntestTime.advance(Duration.ofSeconds(5));\n```\n\n### More Examples\nFor more detailed usage examples, check out the [Timestone Examples][2] repository.\n\n## License\n\nThis project is licensed under the [MIT License][1].\n\n[1]: ./LICENSE\n[2]: ./timestone-examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpredatorray%2Ftimestone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpredatorray%2Ftimestone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpredatorray%2Ftimestone/lists"}