{"id":13611242,"url":"https://github.com/raheemadamboev/timer-flow","last_synced_at":"2026-02-07T23:34:25.263Z","repository":{"id":119075747,"uuid":"517370548","full_name":"raheemadamboev/timer-flow","owner":"raheemadamboev","description":"⏳️ Light library that gives you timer functionality and exposes Kotlin Flow","archived":false,"fork":false,"pushed_at":"2025-08-03T09:58:52.000Z","size":13798,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-03T11:35:01.247Z","etag":null,"topics":["android","android-library","kotlin","kotlin-coroutines","kotlin-flows","timer","timer-flow","timer-library"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raheemadamboev.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,"zenodo":null}},"created_at":"2022-07-24T16:02:03.000Z","updated_at":"2025-08-03T09:58:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"d05a8049-87dc-4289-9087-24b1d73941a6","html_url":"https://github.com/raheemadamboev/timer-flow","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/raheemadamboev/timer-flow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raheemadamboev%2Ftimer-flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raheemadamboev%2Ftimer-flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raheemadamboev%2Ftimer-flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raheemadamboev%2Ftimer-flow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raheemadamboev","download_url":"https://codeload.github.com/raheemadamboev/timer-flow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raheemadamboev%2Ftimer-flow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29212712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T23:14:30.912Z","status":"ssl_error","status_checked_at":"2026-02-07T23:14:17.253Z","response_time":63,"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":["android","android-library","kotlin","kotlin-coroutines","kotlin-flows","timer","timer-flow","timer-library"],"created_at":"2024-08-01T19:01:53.255Z","updated_at":"2026-02-07T23:34:25.243Z","avatar_url":"https://github.com/raheemadamboev.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eTimer Flow\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://developer.android.com/index.html\"\u003e\u003cimg alt=\"Android\" src=\"https://img.shields.io/badge/platform-android-green.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://jitpack.io/#raheemadamboev/timer-flow\"\u003e\u003cimg alt=\"Version\" src=\"https://jitpack.io/v/raheemadamboev/timer-flow.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://android-arsenal.com/api?level=21\"\u003e\u003cimg alt=\"API\" src=\"https://img.shields.io/badge/API-21%2B-brightgreen.svg?style=flat\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n⏳️ \u003cb\u003eTimerFlow\u003c/b\u003e is a light library to use Timer functionality in Android. The library is implemented via Kotlin Coroutines and Kotlin Flows.\n\u003c/p\u003e\n\n# Setup\n\nAdd the maven library bucket to the `dependencyResolutionManagement.repositories` block in `settings.gradle.kts` file as follows:\n```kotlin\ndependencyResolutionManagement {\n  ...\n  repositories {\n    ...\n    maven(\"https://jitpack.io\")\n  }\n}\n```\n\nInstall the library to the project in desired module's `build.gradle.kts` file. Replace `\u003ccurrent_version\u003e` with the actual version:\n```kotlin\nimplementation(\"com.github.raheemadamboev:timer-flow:\u003ccurrent_version\u003e\")\n```\n\n# Implementation\n\n**Create an object of Timer:**\n\n```kotlin\nval timer = Timer()\n```\n\n**Set timer duration in milliseconds (default: 10 000):**\n\n```kotlin\ntimer.timerDuration = 5_000L\n```\n\n**Start timer:**\n\n```kotlin\ntimer.start()\n```\n\n**Observe time of timer:**\n\n```kotlin\nlifecycleScope.launch {\n    timer.time.collectLatest { time -\u003e\n      // update UI, do something\n      println(time.toString())\n    }\n}\n```\n\n**Pause timer:**\n\n```kotlin\ntimer.pause()\n```\n_If you pause timer, do not forget to stop() it. Otherwise, it runs forever._\n\n**Resume timer:**\n\n```kotlin\ntimer.resume()\n```\n\n**Reset timer:**\n\n```kotlin\ntimer.reset()\n```\n\n**Set checkpoint time (default: 3 000) so that you will get notified when it is reached. It is implemented via Kotlin Channel and received as Kotlin Flow. So you will only get notified once:**\n\n```kotlin\ntimer.timerCheckpoint = 2_500L\n\nlifecycleScope.launch {\n  timer.event.collect { event -\u003e\n    when(event) {\n      Started -\u003e Unit // timer started\n      Checkpoint -\u003e Unit // checkpoint reached\n      Finished -\u003e Unit // timer finished naturally, not programmatically\n    }\n  }\n}\n```\n\n**Observe timer states. It is implemented via Kotlin StateFlow so you always get the current timer state:**\n\n```kotlin\nlifecycleScope.launch {\n timer.state.collectLatest { state -\u003e\n  when(state) {\n   Idle -\u003e Unit // timer is in idle position, not running\n   Ticking -\u003e Unit // timer is ticking, running\n   Paused -\u003e Unit // timer is paused, not running\n   Finished -\u003e Unit // timer is finished naturally, not programmatically finished, not running\n   Stopped -\u003e Unit // timer is stoped programmatically by calling stop() function, not running\n  }\n }\n}\n```\n\n**After finished using Timer, please do not forget to stop(). Otherwise, it won't get garbage collected!**\n\n```kotlin\ntimer.stop()\n```\n\n# Demo\n\nVery simple Jetpack Compose demo. \u003ca href=\"https://github.com/raheemadamboev/timer-flow/blob/master/extra/app-debug.apk\"\u003eDownload demo\u003c/a\u003e\n\n\u003cimg src=\"https://github.com/raheemadamboev/timer-flow/blob/master/extra/banner.gif\" width=\"200\" height=\"400\"\u003e\n\n# Projects using this library\n\n**GoTest** 250 000+ downloads in \u003ca href=\"https://play.google.com/store/apps/details?id=xyz.teamgravity.gotest\"\u003eGoogle Play Store\u003c/a\u003e\n\n**Buxgalteriya schyotlar rejasi** 50 000+ downloads in \u003ca href=\"https://play.google.com/store/apps/details?id=xyz.teamgravity.uzbekistanaccountingcode\"\u003eGoogle Play Store\u003c/a\u003e\n\n**Irregular Verbs**  25 000+ downloads in \u003ca href=\"https://play.google.com/store/apps/details?id=xyz.teamgravity.irregularverbs\"\u003eGoogle Play Store\u003c/a\u003e\n\n# License\n\n```xml\nDesigned and developed by raheemadamboev (Raheem) 2022.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraheemadamboev%2Ftimer-flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraheemadamboev%2Ftimer-flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraheemadamboev%2Ftimer-flow/lists"}