MCPcopy Create free account
hub / github.com/NetHack/NetHack / msleep

Function msleep

sys/vms/vmstty.c:548–561  ·  view source on GitHub ↗

sleep for specified number of milliseconds (note: the timer used generally only has 10-millisecond resolution at the hardware level...) */

Source from the content-addressed store, hash-verified

546/* sleep for specified number of milliseconds (note: the timer used
547 generally only has 10-millisecond resolution at the hardware level...) */
548void
549msleep(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

Callers 2

tty_delay_outputFunction · 0.50
tty_delay_outputFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected