{"id":22437810,"url":"https://github.com/plannigan/timeslip","last_synced_at":"2026-04-13T23:01:44.986Z","repository":{"id":54387019,"uuid":"192210939","full_name":"plannigan/timeslip","owner":"plannigan","description":"Time manipulation for JVM test cases","archived":false,"fork":false,"pushed_at":"2025-07-16T04:25:26.000Z","size":1166,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-17T07:25:44.463Z","etag":null,"topics":["java","kotlin","testing"],"latest_commit_sha":null,"homepage":"https://timeslip.hypercubetools.com/","language":"Kotlin","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/plannigan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null},"funding":{"github":"plannigan"}},"created_at":"2019-06-16T16:05:23.000Z","updated_at":"2025-06-21T21:44:33.000Z","dependencies_parsed_at":"2025-06-20T00:26:50.636Z","dependency_job_id":null,"html_url":"https://github.com/plannigan/timeslip","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/plannigan/timeslip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plannigan%2Ftimeslip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plannigan%2Ftimeslip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plannigan%2Ftimeslip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plannigan%2Ftimeslip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plannigan","download_url":"https://codeload.github.com/plannigan/timeslip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plannigan%2Ftimeslip/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265982728,"owners_count":23859573,"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":["java","kotlin","testing"],"created_at":"2024-12-06T00:15:05.899Z","updated_at":"2026-04-13T23:01:44.980Z","avatar_url":"https://github.com/plannigan.png","language":"Kotlin","funding_links":["https://github.com/sponsors/plannigan"],"categories":[],"sub_categories":[],"readme":"# TimeSlip: Time manipulation for JVM test cases\n\nTimeSlip allows test cases to manipulate time by providing a concrete `java.time.Clock` implementation that will operate\nin a deterministic way, independent of the actual passage of time.\n\nThe TimeSlip API is specifically designed to be easy to use from Kotlin and Java code.\n\n[![CI pipeline status](https://github.com/plannigan/timeslip/actions/workflows/main.yaml/badge.svg?branch=main)][ci]\n[![Kotlin](https://img.shields.io/badge/kotlin-2.2.21-blue.svg)](http://kotlinlang.org)\n[![MavenCentral](https://img.shields.io/maven-central/v/com.hypercubetools/timeslip)](https://mvnrepository.com/artifact/com.hypercubetools/timeslip)\n[![codecov](https://codecov.io/gh/plannigan/timeslip/branch/main/graph/badge.svg?token=XrvidOv0fG)](https://codecov.io/gh/plannigan/timeslip)\n\n## Installation\n\nReleases are published to [maven central][maven].\n \nIt can be included in your project by including the following in your project's build configuration.\n\n```gradle\ndependencies {\n    testImplementation 'com.hypercubetools:timeslip:0.1.0'\n}\n```\n\n```maven\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.hypercubetools\u003c/groupId\u003e\n  \u003cartifactId\u003etimeslip\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.0\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n## Detailed Documentation\n\nFind more information about the API and how to use it on the [project website][project_website]\n\n## Examples\n\n```kotlin\nfun formatTime(clock: Clock) =\n    DateTimeFormatter.ISO_TIME.withZone(clock.zone).format(clock.instant())\n\nval constClock = TimeSlip.at(Instant.parse(\"2007-12-03T10:15:30.00Z\"))\nprintln(formatTime(constClock))\nprintln(formatTime(constClock))\nprintln(formatTime(constClock))\n\n// 10:15:30Z\n// 10:15:30Z\n// 10:15:30Z\n\nval tickingClock = TimeSlip.startAt(Instant.parse(\"2007-12-03T10:15:30.00Z\"))\nprintln(formatTime(tickingClock))\nprintln(formatTime(tickingClock))\nprintln(formatTime(tickingClock))\n\n// 10:15:30Z\n// 10:15:31Z\n// 10:15:32Z\n\nval ticking2MinClock = TimeSlip.startAt(\n    Instant.parse(\"2007-12-03T10:15:30.00Z\"),\n    tickAmount = Duration.ofMinutes(2)\n)\nprintln(formatTime(ticking2MinClock))\nprintln(formatTime(ticking2MinClock))\nprintln(formatTime(ticking2MinClock))\n\n// 10:15:30Z\n// 10:17:30Z\n// 10:19:30Z\n\nval sequenceClock = TimeSlip.sequence {\n    first(Instant.parse(\"2007-12-03T10:15:30.00Z\"))\n    then(Instant.parse(\"2007-12-03T10:16:00.00Z\"), Instant.parse(\"2007-12-03T10:17:00.00Z\"))\n}\nprintln(formatTime(sequenceClock))\nprintln(formatTime(sequenceClock))\nprintln(formatTime(sequenceClock))\n\n// 10:15:30Z\n// 10:16:00Z\n// 10:17:00Z\n```\n\n[ci]: https://github.com/plannigan/timeslip/actions\n[maven]: https://mvnrepository.com/artifact/com.hypercubetools/timeslip\n[project_website]: https://timeslip.hypercubetools.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplannigan%2Ftimeslip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplannigan%2Ftimeslip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplannigan%2Ftimeslip/lists"}