Skip to content

Instantly share code, notes, and snippets.

@gb96
gb96 / CountDownTimer.java
Last active September 17, 2019 00:42 — forked from bverc/CountDownTimer.java
Drop-in alternative for the Android CountDownTimer class, but [1] can cancel from within onTick, [2] can pause() and resume(), [3] can restart(long millisInFuture, long countDownInterval), [4] isCancelled() and isPaused(), [5] config(long, long)
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software