cosmopolitan/libc/time/time.h
Justine Tunney 8f522cb702
Make improvements
This change progresses our AARCH64 support:

- The AARCH64 build and tests are now passing
- Add 128-bit floating-point support to printf()
- Fix clone() so it initializes cosmo's x28 TLS register
- Fix TLS memory layout issue with aarch64 _Alignas vars
- Revamp microbenchmarking tools so they work on aarch64
- Make some subtle improvements to aarch64 crash reporting
- Make kisdangerous() memory checks more accurate on aarch64
- Remove sys_open() since it's not available on Linux AARCH64

This change makes general improvements to Cosmo and Redbean:

- Introduce GetHostIsa() function in Redbean
- You can now feature check using pledge(0, 0)
- You can now feature check using unveil("",0)
- Refactor some more x86-specific asm comments
- Refactor and write docs for some libm functions
- Make the mmap() API behave more similar to Linux
- Fix WIFSIGNALED() which wrongly returned true for zero
- Rename some obscure cosmo keywords from noFOO to dontFOO
2023-06-03 08:12:22 -07:00

39 lines
1.1 KiB
C

#ifndef COSMOPOLITAN_LIBC_TIME_TIME_H_
#define COSMOPOLITAN_LIBC_TIME_TIME_H_
#define TIME_UTC 1
#define CLOCKS_PER_SEC 1000000L
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
_Hide extern const char kWeekdayNameShort[7][4];
_Hide extern const char kWeekdayName[7][10];
_Hide extern const char kMonthNameShort[12][4];
_Hide extern const char kMonthName[12][10];
_Hide extern const unsigned short kMonthYearDay[2][12];
extern char *tzname[2];
extern long timezone;
extern int daylight;
char *ctime(const int64_t *);
char *ctime_r(const int64_t *, char[hasatleast 26]);
double difftime(int64_t, int64_t)
dontthrow pureconst;
extern long double (*nowl)(void);
int64_t clock(void);
int64_t posix2time(int64_t) pureconst;
int64_t time(int64_t *);
int64_t time2posix(int64_t) pureconst;
long double ConvertTicksToNanos(double);
long double dsleep(long double);
long double dtime(int);
unsigned alarm(unsigned);
unsigned sleep(unsigned);
void RefreshTime(void);
void tzset(void);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_TIME_TIME_H_ */