summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/sys/time.h24
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__ */