Skip to content

Conversation

@lanodan
Copy link

@lanodan lanodan commented Oct 31, 2025

Description

gettimeofday() got marked obsolete in POSIX.1-2008 and removed
in POSIX.1-2024.

Alternatives:

  • clock() introduced in C89, part of POSIX.1-1995 (and meant for CPU time)
  • timespec_get() introduced in C11 and part of POSIX.1-2024
  • clock_gettime() introduced in POSIX.1-1995,
    absent in ISO C so requires POSIX feature macros

PR checklist

Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.

  • changelog not required because: internal change
  • development PR this is against development branch
  • TF-PSA-Crypto PR not required because: internal change
  • framework PR not required: internal change
  • 3.6 PR provided # | not required because: (waiting for first feedback, applies cleanly)
  • tests not required because: not an API change

Notes for the submitter

Please refer to the contributing guidelines, especially the
checklist for PR contributors.

Help make review efficient:

  • Multiple simple commits
    • please structure your PR into a series of small commits, each of which does one thing
  • Avoid force-push
    • please do not force-push to update your PR - just add new commit(s)
  • See our Guidelines for Contributors for more details about the review process.

gettimeofday() got marked obsolete in POSIX.1-2008 and removed
in POSIX.1-2024.

Alternatives:
* clock() introduced in C89, part of POSIX.1-1995 (and meant for CPU time)
* timespec_get() introduced in C11 and part of POSIX.1-2024
* clock_gettime() introduced in POSIX.1-1995,
  absent in ISO C so requires POSIX feature macros

Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
@minosgalanakis minosgalanakis added needs-review Every commit must be reviewed by at least two team members, component-platform Portability layer and build scripts needs-ci Needs to pass CI tests needs-reviewer This PR needs someone to pick it up for review size-xs Estimated task size: extra small (a few hours at most) labels Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component-platform Portability layer and build scripts needs-ci Needs to pass CI tests needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review size-xs Estimated task size: extra small (a few hours at most)

Projects

Status: In Development

Development

Successfully merging this pull request may close these issues.

2 participants