Skip to content

Every timer should have a unique id #1

@PhilipDaniels

Description

@PhilipDaniels

Every timer should be given a unique Id and this should be output in the log. This will allow start/end messages to be correlated. It can be achieved simply by using an AtomicUsize.

fn new() -> Self {
        static ID: AtomicUsize = AtomicUsize::new(0);

        Self {
            id: ID.fetch_add(1, Ordering::SeqCst)
        }
    }

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