
Add `CLOCKS_PER_SEC` and the older `CLK_TCK`. Allows the user to define a `__CLK_TCK` to override if necessary. Also add an extra column for embedded AArch64 in `time.rst`
22 lines
482 B
C
22 lines
482 B
C
#ifndef LLVM_LIBC_MACROS_TIME_MACROS_H
|
|
#define LLVM_LIBC_MACROS_TIME_MACROS_H
|
|
|
|
#if defined(__AMDGPU__) || defined(__NVPTX__)
|
|
#include "gpu/time-macros.h"
|
|
#elif defined(__linux__)
|
|
#include "linux/time-macros.h"
|
|
#elif defined(__ELF__)
|
|
#include "baremetal/time-macros.h"
|
|
#else
|
|
#define CLOCKS_PER_SEC 1000000
|
|
#endif
|
|
|
|
#define CLK_TCK CLOCKS_PER_SEC
|
|
|
|
#define TIME_UTC 1
|
|
#define TIME_MONOTONIC 2
|
|
#define TIME_ACTIVE 3
|
|
#define TIME_THREAD_ACTIVE 4
|
|
|
|
#endif // LLVM_LIBC_MACROS_TIME_MACROS_H
|