diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-11-18 13:41:18 -0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-12-15 23:55:45 +0000 |
commit | 12e2abf6abad06b572a18af832afc33140a8207b (patch) | |
tree | b8f05701c9984405e208318d5bbe34914810dfd2 /builtin | |
parent | cddfff5e590d0d6015563e68eade601db93f03df (diff) | |
download | chrome-ec-12e2abf6abad06b572a18af832afc33140a8207b.tar.gz |
libc/syscalls: Add gettimeofday
BRANCH=none
BUG=b:234181908, b:254530679
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I326f1b4103fa7ce577758d5baa42cd572af8affa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4062463
Reviewed-by: Andrea Grandi <agrandi@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/sys/time.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/builtin/sys/time.h b/builtin/sys/time.h new file mode 100644 index 0000000000..537ca6ceb0 --- /dev/null +++ b/builtin/sys/time.h @@ -0,0 +1,24 @@ +/* Copyright 2022 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __CROS_EC_SYS_TIME_H__ +#define __CROS_EC_SYS_TIME_H__ + +#include <sys/types.h> + +/** + * Partial implementation of <sys/time.h> header: + * https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_time.h.html + */ + +typedef int64_t time_t; +typedef int32_t suseconds_t; + +struct timeval { + time_t tv_sec; /* seconds */ + suseconds_t tv_usec; /* microseconds */ +}; + +#endif /* __CROS_EC_SYS_TIME_H__ */ |