Refactor out some duplicated code

This commit is contained in:
Justine Tunney 2021-08-14 06:17:56 -07:00
parent e963d9c8e3
commit 579b597ded
58 changed files with 1110 additions and 3214 deletions

View file

@ -39,6 +39,7 @@ long sizetol(const char *, long) paramsnonnull() libcesque;
cosmopolitan § conversion » time
*/
struct timespec WindowsTimeToTime(uint64_t);
int64_t DosDateTimeToUnix(unsigned, unsigned);
struct timespec FileTimeToTimeSpec(struct NtFileTime);
struct NtFileTime TimeSpecToFileTime(struct timespec);
@ -48,6 +49,11 @@ void FileTimeToTimeVal(struct timeval *, struct NtFileTime) nothrow;
struct NtFileTime TimeValToFileTime(const struct timeval *) nosideeffect;
long convertmicros(const struct timeval *, long) paramsnonnull() nosideeffect;
/* forceinline struct timespec WindowsTimeToTime(uint64_t x) { */
/* return (struct timespec){x / HECTONANOSECONDS - MODERNITYSECONDS, */
/* x % HECTONANOSECONDS * 100}; */
/* } */
/*───────────────────────────────────────────────────────────────────────────│─╗
cosmopolitan § conversion » manipulation
*/