Plan 9 from Bell Labs’s /usr/web/sources/contrib/dho/kimp/p9/delay

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TH DELAY 9
.SH NAME
delay, microdelay, addclock0link \- small delays, clock interrupts
.SH SYNOPSIS
.ta \w'\fLvoid 'u
.B
void	delay(int n)
.PP
.B
void	microdelay(int n)
.PP
.B
void	addclock0link(void(*clockf)(void), int ms)
.SH DESCRIPTION
.I Delay
busy waits for
.I n
milliseconds, forced to be at least one millisecond.
.PP
.I Microdelay
is similar, but busy waits for
.IR n
microseconds.
.PP
For delays on the order of clock ticks,
.I tsleep
(see
.IR sleep (9))
provides a better alternative to the busy waiting of these routines.
.PP
.I Addclock0link
adds
.I clockf
to a list of functions to be periodically executed at a regular timed interval
(specified in milliseconds).
.SH SOURCE
.B /sys/src/9/port/portclock.c
.br
.B /sys/src/9/*/clock.c
.SH SEE ALSO
.IR seconds (9)
.IR seconds (9)
.IR timer (9)

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].