Skip to content
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

[BUG]: Clock Type Mismatch Causing Initialization Error in "offer_stop_offer_test" #821

Open
Vignesh-Murugappan opened this issue Nov 29, 2024 · 0 comments
Labels

Comments

@Vignesh-Murugappan
Copy link

Vignesh-Murugappan commented Nov 29, 2024

vSomeip Version

v3.5.1

Boost Version

1.76

Environment

Android TARGET_ARCH=x86_64

Describe the bug

File: https://github.com/COVESA/vsomeip/blob/master/test/common/include/common/test_timer.hpp

  • start is of type std::chrono::system_clock::time_point
  • current is of type std::chrono::high_resolution_clock::time_point
  • target is of type std::chrono::milliseconds
  • The difference (current - start) is computed using two different clock types, leading to incompatibility since start is initialized with std::chrono::system_clock::now() while current uses std::chrono::high_resolution_clock::now()
  1. The error "no matching constructor for initialization of 'std::chrono::system_clock::time_point'" occurs because of how the start member, of type 'std::chrono::system_clock::time_point', is being initialized.

  2. Additionally, the result of(current - start)is being compared withtarget , which is in milliseconds, but the result is incorrectly cast to std::chrono::seconds before the comparison. This creates a type mismatch during compilation

Reproduction Steps

No response

Expected behaviour

No response

Logs and Screenshots

Screenshot 2024-11-29 205101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant