Skip to content

About countdown #22

@Monkey-X-Byte

Description

@Monkey-X-Byte

There is an error in the countdown time return, and it does not stop when the time reaches completion。

func start() {
        timer.countMode = .countDown(fromSeconds: 60)
        timer.defultValue = 0
        timer.effectiveValue = 1
        timer.timeInterval = 1
        timer.isActiveInBackground = true

        // Set up event handlers
        timer.lastStateDidChangeHandler = { state in
            print("Timer state changed: \(state)")
        }

        timer.elapsedTimeDidChangeHandler = { elapsedTime in
            print("Elapsed time updated: \(elapsedTime)")
        }

        // Start the timer
        timer.start()
    }

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions