Skip to content

Feature request: Restart #15

@glenneroo

Description

@glenneroo

It would be useful in some special cases to be able to restart a running timer from the beginning. Maybe this functionality already exists? Here is my attempt, but maybe I missed something:

/// <summary>
/// Restarts a running or paused timer.
/// </summary>
public void Restart() 
{
    if (this.isDone) 
    {
        return;
    }

    this._timeElapsedBeforePause = null;
    this._startTime = this.GetWorldTime();
    this.isCompleted = false;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions