| 113 | 121 | int nanosleep(in timespec*, timespec*); |
|---|
| 114 | 122 | int timer_create(clockid_t, sigevent*, timer_t*); |
|---|
| 115 | 123 | int timer_delete(timer_t); |
|---|
| 116 | 124 | int timer_gettime(timer_t, itimerspec*); |
|---|
| 117 | 125 | int timer_getoverrun(timer_t); |
|---|
| 118 | 126 | int timer_settime(timer_t, int, in itimerspec*, itimerspec*); |
|---|
| 119 | 127 | */ |
|---|
| 120 | 128 | |
|---|
| 121 | 129 | version( linux ) |
|---|
| 122 | 130 | { |
|---|
| 137 | | enum CLOCK_REALTIME = 0; // Identifier for system-wide realtime clock. |
|---|
| 138 | | enum CLOCK_MONOTONIC = 1; // Monotonic system-wide clock. |
|---|
| 139 | | enum CLOCK_PROCESS_CPUTIME_ID = 2; // High-resolution timer from the CPU. |
|---|
| 140 | | enum CLOCK_THREAD_CPUTIME_ID = 3; // Thread-specific CPU-time clock. |
|---|
| 141 | | enum CLOCK_MONOTONIC_RAW = 4; // Monotonic system-wide clock, not adjusted for frequency scaling. |
|---|
| 142 | | enum CLOCK_REALTIME_COARSE = 5; // Identifier for system-wide realtime clock, updated only on ticks. |
|---|
| 143 | | enum CLOCK_MONOTONIC_COARSE = 6; // Monotonic system-wide clock, updated only on ticks. |
|---|
| 144 | | |
|---|
| 145 | | enum TIMER_ABSTIME = 0x01; |
|---|
| | 148 | enum CLOCK_REALTIME = 0; |
|---|
| | 149 | enum CLOCK_REALTIME_COARSE = 5; // non-standard |
|---|
| | 150 | enum TIMER_ABSTIME = 0x01; |
|---|
| 146 | 151 | |
|---|
| 147 | 152 | alias int clockid_t; |
|---|
| 148 | 153 | alias int timer_t; |
|---|
| 149 | 154 | |
|---|
| 150 | 155 | int clock_getres(clockid_t, timespec*); |
|---|
| 151 | 156 | int clock_gettime(clockid_t, timespec*); |
|---|
| 152 | 157 | int clock_settime(clockid_t, in timespec*); |
|---|
| 153 | 158 | int nanosleep(in timespec*, timespec*); |
|---|
| 154 | 159 | int timer_create(clockid_t, sigevent*, timer_t*); |
|---|
| 155 | 160 | int timer_delete(timer_t); |
|---|
| 156 | 161 | int timer_gettime(timer_t, itimerspec*); |
|---|
| 157 | 162 | int timer_getoverrun(timer_t); |
|---|
| 158 | 163 | int timer_settime(timer_t, int, in itimerspec*, itimerspec*); |
|---|
| 159 | 164 | } |
|---|
| 160 | 165 | else version( OSX ) |
|---|
| 161 | 166 | { |
|---|
| 162 | 167 | int nanosleep(in timespec*, timespec*); |
|---|
| 163 | 168 | } |
|---|
| 164 | 169 | else version( FreeBSD ) |
|---|
| 165 | 170 | { |
|---|