{"id":24522839,"url":"https://github.com/gbzarelli/chronometer-library","last_synced_at":"2026-05-02T05:05:57.972Z","repository":{"id":180990150,"uuid":"185843947","full_name":"gbzarelli/chronometer-library","owner":"gbzarelli","description":"[ANDROID] [LIBRARY] The Chronometer Library is designed to make it easy to use a stopwatch,   has features that help count turns, and a custom Widget to display the milliseconds.","archived":false,"fork":false,"pushed_at":"2020-01-08T13:42:12.000Z","size":85,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T13:25:03.254Z","etag":null,"topics":["android","android-library","chronometer-library","chronometer-widget","custom-widget","library","stopwatch"],"latest_commit_sha":null,"homepage":"","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/gbzarelli.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}},"created_at":"2019-05-09T17:30:59.000Z","updated_at":"2024-05-02T14:24:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1a37bae-afaa-470a-9ee6-a2b31f6ee1ae","html_url":"https://github.com/gbzarelli/chronometer-library","commit_stats":null,"previous_names":["gbzarelli/chronometer-library"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbzarelli%2Fchronometer-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbzarelli%2Fchronometer-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbzarelli%2Fchronometer-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbzarelli%2Fchronometer-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gbzarelli","download_url":"https://codeload.github.com/gbzarelli/chronometer-library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbzarelli%2Fchronometer-library/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259204802,"owners_count":22821157,"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":["android","android-library","chronometer-library","chronometer-widget","custom-widget","library","stopwatch"],"created_at":"2025-01-22T03:35:56.062Z","updated_at":"2026-05-02T05:05:52.951Z","avatar_url":"https://github.com/gbzarelli.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Issues](https://img.shields.io/github/issues/gbzarelli/chronometer-library.svg) ![Forks](https://img.shields.io/github/forks/gbzarelli/chronometer-library.svg) ![Stars](https://img.shields.io/github/stars/gbzarelli/chronometer-library.svg) ![Release Version](https://img.shields.io/github/release/gbzarelli/chronometer-library.svg)\n\n# Chronometer Library [![CircleCI](https://circleci.com/gh/gbzarelli/chronometer-library.svg?style=svg)](https://circleci.com/gh/gbzarelli/chronometer-library) [![](https://jitpack.io/v/gbzarelli/chronometer-library.svg)](https://jitpack.io/#gbzarelli/chronometer-library)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./widget.png\"/\u003e\n\u003c/p\u003e\n \n The Chronometer Library is designed to make it easy to use a stopwatch, \n has features that help count turns, and a custom Widget to display \n the milliseconds.\n \n## Add Chronometer Library with dependency:\n\n- Add it in your `build.gradle` (root) at the end of repositories:\n\n```gradle\n\tallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url \"https://jitpack.io\" }\n\t\t}\n\t}\n```\n\n- Add the dependency in your `build.gradle` project\n\n```gradle\n\tdependencies {\n\t        implementation 'com.github.gbzarelli:chronometer-library:2.0.0'\n\t}\n```\n\n## How to use the ChronometerWidget\n  \n- Put in your layout xml\n\n```xml\n\u003cbr.com.helpdev.chronometerlib.widget.ChronometerWidget\n        android:id=\"@+id/chronometer_widget\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center_horizontal\"/\u003e\n```\n\n- The code \n\n```kotlin\n    fun start(){\n        chronometer_widget.start()\n    }\n    \n    fun reset(){\n        chronometer_widget.base = SystemClock.elapsedRealtime()\n        stop() \n    }\n    \n    fun stop(){\n        chronometer_widget.stop()\n    }\n```\n\n## How to use the ChronometerManager class\n\n- See `ChronometerManager.kt` and `Chronometer.kt`\n\n```kotlin\n        val manager = ChronometerManager { SystemClock.elapsedRealtime() }\n        manager.start()\n        Thread.sleep(1000) // +1s\n        manager.lap()\n        manager.pause()\n        Thread.sleep(1000) // 1s paused\n        manager.start()\n        Thread.sleep(1000) // +1s\n        manager.stop()\n\n        print(ChronometerUtils.getFormattedTime(manager.getChronometerTime()))\n\n        val obChronometer = manager.chronometer\n        println(obChronometer)\n\n        manager.reset()\n```\n\n## Project Sample\n\n- Play Store: [Swimming Stopwatch (Lap counter)](https://play.google.com/store/apps/details?id=br.com.helpdev.lapscounter.swimming\u0026hl=en)\n- Github: [LapsCounter](https://github.com/gbzarelli/LapsCounter)\n\n# Licence\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbzarelli%2Fchronometer-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbzarelli%2Fchronometer-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbzarelli%2Fchronometer-library/lists"}