[libc-commits] [PATCH] D137881: [libc] Implement gettimeofday

Raman Tenneti via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Nov 11 18:02:34 PST 2022


rtenneti created this revision.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
rtenneti requested review of this revision.

Implement gettimeofday per
.../onlinepubs/9699919799/functions/gettimeofday.html.
This call clock_gettime to implement gettimeofday function.

Tested:
Limited unit test: This makes a call and checks that no error was
returned. Used nanosleep for 100 microseconds and verfified it
returns a value that elapses more than 100 microseconds and less
than 300 microseconds.

Co-authored-by: Jeff Bailey <jeffbailey at google.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137881

Files:
  libc/config/linux/aarch64/entrypoints.txt
  libc/config/linux/api.td
  libc/config/linux/x86_64/entrypoints.txt
  libc/docs/date_and_time.rst
  libc/include/CMakeLists.txt
  libc/spec/posix.td
  libc/src/time/CMakeLists.txt
  libc/src/time/gettimeofday.cpp
  libc/src/time/gettimeofday.h
  libc/test/src/time/CMakeLists.txt
  libc/test/src/time/gettimeofday_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137881.474907.patch
Type: text/x-patch
Size: 8986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20221112/a6c294ec/attachment.bin>


More information about the libc-commits mailing list