Skip to content

What is meaning by "pause"? #57

@desmeit

Description

@desmeit

I try to have a simple timer and need to pause it:

late final PausableTimer timer;

timer = PausableTimer(Duration(seconds: 1), () {
    print('Fired!');
    timer
        ..reset()
       ..start();
    });
    timer.start();

now I want to pause it:

timer!.pause();

But after starting again with timer!.start(); it starts from millisecond 0.
This is not good because I never hit exactly at millisecond 0 when pausing, but maybe at 323 millisecond or similar.

How can I restart the timer from the exact position where i paused it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions