Skip to content

Fixed the "missed" count in timerfd example - #1

Open
pauldeng wants to merge 1 commit into
csimmonds:masterfrom
pauldeng:master
Open

Fixed the "missed" count in timerfd example#1
pauldeng wants to merge 1 commit into
csimmonds:masterfrom
pauldeng:master

Conversation

@pauldeng

Copy link
Copy Markdown

Hi Chris,

Thanks for the blog topic about timerfd. It helps me a lot!

I notice you already provided a fix in your blog post regarding the "missed" count in timerfd example. It seems the example in the GitHub is not updated accordingly.

In fact, I am still not quite understand your comments in your blog hope that you can help: "when you read, the value is a count of the timer events since the last one, which should be 1":

  • Does this mean that value 1 actually means correctly fired timer events?
  • If value is 0, that means the timer events is missed. Then, should we say this below instead?
    if (missed == 0) info->wakeups_missed +=1;

Cheers,
Paul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants