Skip to content

Conversation

@practac
Copy link

@practac practac commented Oct 30, 2024

제가 새로운 폴더를 만들고 머지한다음에 풀 리퀘를 날리려 했는데 좀 꼬여서... 여기서 해보ㅏ요ㅠㅠ

@SuHyeon00 SuHyeon00 self-requested a review November 6, 2024 13:12
Copy link
Contributor

@SuHyeon00 SuHyeon00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

millisecs를 표기하는 부분이 기능상 어색해보이는 것 외에는 정상 작동하는 것 같습니다! 그리고 현재 구현된 방식은 postDelayed함수를 이용하여 10ms 단위로 업데이트 하는 것 같은데 이럴 경우 정확한 시스템 시간 간격으로 업데이트가 되는지 확인해보는 것도 좋을 것 같아요~ 수고하셨습니다!

Comment on lines +26 to +29
// XML 파일의 뷰 ID 연결
tvTimer = findViewById(R.id.tvTimer)
btnStart = findViewById(R.id.btnStart)
btnClear = findViewById(R.id.btnClear)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 ViewBinding 이용해서 연결해주세요!

private var seconds = 0
private var minutes = 0

private val handler = Handler()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handler를 사용할 때 기본 생성자를 사용하는 방식은 deprecated된 버전이니 초기화 시 사용할 Looper를 함께 넘겨주는 방식으로 초기화해주세요!

private val timerRunnable = object : Runnable {
override fun run() {
if (isRunning) {
milliseconds += 10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10단위로 증가시켜 3자리로 표기하는 이유가 있을까요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants