#endif // _di_f_directory_mode_
/**
- * A non-kernel dependent version of "struct timespec".
- *
- * seconds: The total number of seconds.
- * nanoseconds: The total number of nanoseconds.
- */
-#ifndef _di_f_time_spec_t_
- typedef struct {
- uint64_t seconds;
- uint64_t nanoseconds;
- } f_time_spec_t;
-
- #define f_time_spec_t_initialize { 0, 0 }
-
- #define macro_f_time_spec_t_clear(spec) \
- spec.seconds = 0; \
- spec.nanoseconds = 0;
-#endif // _di_f_time_spec_t_
-
-/**
* Hold a unit of Time.
*
- * This utilizes the unit of measurement called a "Time", represented with uppercase "T".
+ * This is intended to be utilized for the unit of measurement called a "Time", represented with uppercase "T".
* For comparison, a unit of Time is equivalent to a nanosecond, or 10^-9 seconds.
*
* A unit of Time is intended to represent some unit of Time such that a single 64-bit integer may hold all units of Time for a single calendar year.
#endif // _di_f_time_t_
/**
+ * A non-kernel dependent version of "struct timespec".
+ *
+ * Properties:
+ * - seconds: The total number of seconds.
+ * - seconds_nano: The total number of nanoseconds.
+ */
+#ifndef _di_f_time_spec_t_
+ typedef struct {
+ f_time_t seconds;
+ f_time_t seconds_nano;
+ } f_time_spec_t;
+
+ #define f_time_spec_t_initialize { f_time_t_initialize, f_time_t_initialize }
+
+ #define macro_f_time_spec_t_clear(spec) \
+ spec.seconds = 0; \
+ spec.seconds_nano = 0;
+#endif // _di_f_time_spec_t_
+
+/**
* Hold a unit of Time along with a year to represent a date.
*
* This implementation of a date using the unit of Time is limited on the size of the year.
*
* For example, "2020:86400000000000" would represent: January 02, 2020 0:00 UTC.
* For example, "2020:86.4 TT" would represent: January 02, 2020 0:00 UTC.
+ *
+ * Properties:
+ * - year: A number representing the year.
+ * - time: A number representing the time.
*/
#ifndef _di_f_date_t_
typedef struct {
#endif // _di_f_date_t_
/**
+ * A variation of f_date_t that using f_time_spec_t rather than f_time_t.
+ *
+ * This can is a more precise alternative to f_date_t because it stores nanoseconds.
+ *
+ * The f_time_spec_t.time.seconds can be directly cast to the f_date_t.time.
+ *
+ * Properties:
+ * - year: A number representing the year.
+ * - time: A number representing the time with seconds and nanoseconds.
+ */
+#ifndef _di_f_date_spec_t_
+ typedef struct {
+ f_time_t year;
+ f_time_spec_t time;
+ } f_date_spec_t;
+
+ #define f_date_spec_t_initialize { f_time_t_initialize, macro_f_time_spec_t_clear }
+
+ #define macro_f_date_spec_t_clear(date) \
+ date.year = 0; \
+ macro_f_time_spec_t_clear(date.time);
+#endif // _di_f_date_spec_t_
+
+/**
* An array of array lengths.
*
* The macros are defined in type_array.h or type_array-common.h.