summaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
authorRaman Tenneti <rtenneti@google.com>2022-11-11 18:00:01 -0800
committerRaman Tenneti <rtenneti@google.com>2022-11-11 18:02:33 -0800
commit78f172e45ad95bb9cac907486af968a9e41d9570 (patch)
tree37d634057ecda97b9bb66a1998690cf4de270c80 /libc/include
parent1fb5c7a2f17f10e768160fe23d4a04537c7224c1 (diff)
downloadllvm-78f172e45ad95bb9cac907486af968a9e41d9570.tar.gz
[libc] Implement gettimeofday
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@google.com> Differential Revision: https://reviews.llvm.org/D137881
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index f9d3ee5164f9..f32c8e30902f 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -106,6 +106,7 @@ add_gen_header(
.llvm-libc-types.clockid_t
.llvm-libc-types.struct_tm
.llvm-libc-types.struct_timespec
+ .llvm-libc-types.struct_timeval
)
add_gen_header(