delay 745 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. .TH DELAY 9
  2. .SH NAME
  3. delay, microdelay, addclock0link \- small delays, clock interrupts
  4. .SH SYNOPSIS
  5. .ta \w'\fLvoid 'u
  6. .B
  7. void delay(int n)
  8. .PP
  9. .B
  10. void microdelay(int n)
  11. .PP
  12. .B
  13. void addclock0link(void(*clockf)(void))
  14. .SH DESCRIPTION
  15. .I Delay
  16. busy waits for
  17. .I n
  18. milliseconds, forced to be at least one millisecond.
  19. .PP
  20. .I Microdelay
  21. is similar, but busy waits for
  22. .I n
  23. microseconds.
  24. .PP
  25. For delays on the order of clock ticks,
  26. .I tsleep
  27. (see
  28. .IR sleep (9))
  29. provides a better alternative to the busy waiting of these routines.
  30. .PP
  31. .I Addclock0link
  32. adds
  33. .I clockf
  34. to a list of functions to be executed at each clock interrupt on
  35. the first processor.
  36. .SH SOURCE
  37. .B /sys/src/9/port/portclock.c
  38. .br
  39. .B /sys/src/9/*/clock.c
  40. .SH SEE ALSO
  41. .IR sleep (9)