REFACTOR: Store timestamps using milliseconds instead of seconds #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solves #40
Motivation / Context
After running some tests with this repository, I was running into an issue of requests often not being accounted if they happened within one second from one another.
With the approach proposed by the pull request, the issue described above will happen less often, given that they would need to happen at the exact millisecond in order to overlap and cause requests to not be accounted.
Testing Instructions / How This Has Been Tested
Tests were slightly updated to account for the fact that timestamps will now be stored in milliseconds instead of seconds.
At a later point, we might want to simply rewrite the method
setTimestampSecondsand its callers to start using milliseconds instead of seconds.For now, we just multiplied the seconds by 1000 so we could get the ms. value.