Skip to content

New TIMESTAMPMODE for QPC without system start time #773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

04alband
Copy link

This mode functions the same as TIMESTAMPMODE_SINGLE_SYNCHRONIZATION except the start time is set to zero. Thus the timestamp appears as "1970-01-01..." in Wireshark for example.

This is useful if an application wishes to synchronise packets with an external time source and is able to convert from QPC ticks to that time source. In the regular mode TIMESTAMPMODE_SINGLE_SYNCHRONIZATION, the driver start time must first be subtracted, which can only be approximated, substantially reducing accuracy. With this modification, high accuracy can be maintained.

I've named the new mode TIMESTAMPMODE_SINGLE_SYNCHRONIZATION_RELATIVE since the returned timestamps are relative to system boot time, but there may be better names. Similarly, it may be better to pass the timestamp mode into the call to TIME_SYNCHRONIZE and set the timeval to 0 there.

…s are based of the performance counter but do not have a system start time offset applied. Thus, applications can directly convert from QPC (after accounting for frequency) to another time format or source.
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.

1 participant