Skip to content

Conversation

kifir23917
Copy link
Member

No description provided.

* 64 bit time in microseconds (1/1_000_000 of a second), since boot
*/
using efitimeus_t = int64_t;
using efitimeus_t = tagged_numeric_t<timestamp_tag_s<int64_t, time_unit::MICROSECOND>>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can/should we just use std::chrono instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it makes sense. I will rewrite code using std::chrono::duration<int64_t, micros> and std::chrono::time_point.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it makes sense. I will rewrite code using std::chrono::duration<int64_t, micros> and std::chrono::time_point.

What about our 1/168_000_000 second ticks and our 1/218_000_000 second tickets depending on target platform?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about our 1/168_000_000 second ticks and our 1/218_000_000 second tickets depending on target platform?

// 4mhz was chosen because it's the GCD of (84, 108, 200), the three speeds of STM32 TIM5 clock currently supported
// https://www.wolframalpha.com/input/?i=common+factors+of+168+180+216
#define US_TO_NT_MULTIPLIER (4)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kifir23917 kifir23917 marked this pull request as draft April 25, 2024 18:59
@kifir23917
Copy link
Member Author

#16

@kifir23917 kifir23917 closed this Apr 26, 2024
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.

3 participants