Skip to content

Conversation

@dbeinder
Copy link
Contributor

@dbeinder dbeinder commented Apr 21, 2025

The current implementation doesn't convert Windows ticks (100ns) to µs. It will then fill tv_usec with numbers up to 9'999'999µs (up to 10 seconds instead of 1 sec).

As a result the return value of time_ms() increase 10x too fast (and jumps back every second) so timeout errors occur very frequently during flashloader write on Windows.

Ref: https://learn.microsoft.com/en-us/windows/win32/sysinfo/converting-a-time-t-value-to-a-file-time

@Nightwalker-87 Nightwalker-87 changed the title Fix Win32 gettimeofday implementation Fixed Win32 gettimeofday implementation May 17, 2025
@Nightwalker-87 Nightwalker-87 merged commit db953ea into stlink-org:testing May 17, 2025
37 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Release v1.8.1 May 17, 2025
@stlink-org stlink-org locked as resolved and limited conversation to collaborators May 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants