How to create my own delay function in C : <p>I'm developing an OS and don't have access to the standard library. Therefore, I don't have access to <code>time.h</code>.</p>

<p>I'm using the following function to create a time delay.</p>

<pre><code>void delay() {
    int c = 1 , d = 1 ;

    for ( c = 1; c &lt;= 100000; c++) {
        for ( d = 1; d &lt;= 100000; d ++) {
            asm("nop");
        }
    }
}
</code></pre>

<p>This waits around twenty seconds; however, I'd like the function to take in an integer and wait for that many seconds. What will I need to do to make this possible?</p>
