Skip to content

Question regarding the test-timing code #16

Answered by jefftenney
efthym asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @efthym -

That loop might look like it is waiting for the tickCount to change, but really it's the opposite. The loop only iterates again if the tick count changes. So in reality, the loop almost never iterates. It is capturing two items that can change asynchronously (the tick-hook RTC snapshot and the OS tick count) and then verifying afterward that neither one changed during/after the capturing. Thus the two items can be considered coherent (or correlated correctly to eachother). Does that help?

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@efthym
Comment options

Answer selected by efthym
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants