Skip to content

Commit

Permalink
fix log_timestamp value (esp-rs#218)
Browse files Browse the repository at this point in the history
The divider should be applied only on the TICKS_PER_SECOND, rather than on the whole systimer count, to get the proper value in millis
  • Loading branch information
AnthonyGrondin authored and bjoernQ committed May 24, 2024
1 parent 69a72da commit dcd45c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esp-wifi/src/wifi/os_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ pub unsafe extern "C" fn log_writev(
*
****************************************************************************/
pub unsafe extern "C" fn log_timestamp() -> u32 {
(crate::timer::get_systimer_count() / crate::timer::TICKS_PER_SECOND / 1_000) as u32
(crate::timer::get_systimer_count() / (crate::timer::TICKS_PER_SECOND / 1_000)) as u32
}

/****************************************************************************
Expand Down

0 comments on commit dcd45c1

Please sign in to comment.