====== timersleep ====== Demonstrates how to use the timer device to wait for an amount of time specified on the command-line. ==== Synopsis ==== ''%%timersleep %%'' ==== Description ==== This program demonstrates how to use the timer device to wait for a certain amount of time. The program does the following: * Parses the command-line arguments * Opens the timer device * Creates an IOReq * Initializes an IOInfo structure * Calls ''%%DoIO()%%'' to perform the wait operation * Cleans up Note that Portfolio provides convenience routines to make using the timer device easier. For example, ''%%CreateTimerIOReq()%%'', ''%%DeleteTimerIOReq()%%'', and ''%%WaitTime()%%''. This example intends to show how in general one can communicate with devices in the Portfolio environment. For more information on the timer convenience routines, see the timer device documentation. ==== Arguments ==== * **num seconds** Number of seconds to wait. * **num microseconds** Number of microseconds to wait. ==== Associated Files ==== timersleep.c ==== Location ==== examples/Kernel