sleep for specified number of milliseconds (note: the timer used generally only has 10-millisecond resolution at the hardware level...) */
| 546 | /* sleep for specified number of milliseconds (note: the timer used |
| 547 | generally only has 10-millisecond resolution at the hardware level...) */ |
| 548 | void |
| 549 | msleep(unsigned mseconds) /* milliseconds */ |
| 550 | { |
| 551 | long pid = 0L, zero = 0L, msec, qtime[2]; |
| 552 | |
| 553 | msec = (long) mseconds; |
| 554 | if (msec > 0 && |
| 555 | /* qtime{0:63} = msec{0:31} * mseconds_to_delta{0:31} + zero{0:31} */ |
| 556 | vms_ok(lib$emul(&msec, &mseconds_to_delta, &zero, qtime))) { |
| 557 | /* schedule a wake-up call, then go to sleep */ |
| 558 | if (vms_ok(sys$schdwk(&pid, (genericptr_t) 0, qtime, (long *) 0))) |
| 559 | (void) sys$hiber(); |
| 560 | } |
| 561 | } |
| 562 | |
| 563 | #endif /* TIMED_DELAY */ |
| 564 |
no outgoing calls
no test coverage detected