17.9.2. sleep

Count to dmesg every one second from 0 up to n - 1:

insmod sleep.ko n=5

The sleep is done with a call to usleep_range directly inside module_init for simplicity.

Bibliography: