Another round of documentation.
Bug: N/A
Test: N/A
Change-Id: I1b818fbb36ddd6d084dee56828290c2717a0c9b0
diff --git a/libc/include/bits/timespec.h b/libc/include/bits/timespec.h
index df7a7ce..0497cfe 100644
--- a/libc/include/bits/timespec.h
+++ b/libc/include/bits/timespec.h
@@ -26,8 +26,12 @@
* SUCH DAMAGE.
*/
-#ifndef _BITS_TIMESPEC_H_
-#define _BITS_TIMESPEC_H_
+#pragma once
+
+/**
+ * @file bits/timespec.h
+ * @brief The `timespec` struct.
+ */
#include <sys/cdefs.h>
#include <sys/types.h>
@@ -38,10 +42,11 @@
*/
#ifndef _STRUCT_TIMESPEC
#define _STRUCT_TIMESPEC
+/** Represents a time. */
struct timespec {
+ /** Number of seconds. */
time_t tv_sec;
+ /** Number of nanoseconds. Must be less than 1,000,000. */
long tv_nsec;
};
#endif
-
-#endif