Skip to content

Potentially used usleep() #35

@RootUp

Description

@RootUp

File: catimg/blob/master/src/catimg.c#L138

i.e
usleep(img.delays[frame - 1] * 10000);

The usleep() function suspends execution of the calling thread for (at least) usec microseconds.
The parameter you pass is a minimum time for sleeping. There's no guarantee that the thread will wake up after exactly the time specified. Given the specific dynamics of the scheduler, it may result in longer than expected delays.

Use nanosleep() instead.

Cheers!

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