From d83d6db3530d8dcb17e9095d094e911e648f0059 Mon Sep 17 00:00:00 2001 From: junha Date: Thu, 28 Dec 2023 17:27:55 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9A=93=EF=B8=8F::=20[#22]=20MindGymStopWatch?= =?UTF-8?q?Kit=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/MindGymKit /MindGymStopWatchKit.swift | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Sources/MindGymKit /MindGymStopWatchKit.swift diff --git a/Sources/MindGymKit /MindGymStopWatchKit.swift b/Sources/MindGymKit /MindGymStopWatchKit.swift new file mode 100644 index 0000000..94fb9a3 --- /dev/null +++ b/Sources/MindGymKit /MindGymStopWatchKit.swift @@ -0,0 +1,23 @@ +import UIKit +import RxSwift + +// MARK: - MindGymStopWatchKit +open class MindGymStopWatchKit { + public let mainStopwatch: TimerControl = Stopwatch() + + public func startTimer() { + mainStopwatch.start() + } + + public func stopTimer() { + mainStopwatch.stop() + } + + public func resetTimer() { + mainStopwatch.reset() + } + + public func recordTime() { + (mainStopwatch as? Stopwatch)?.record() + } +}