category-group: time
layer: 0
header file(s): z_timesubs.h

synopsis.
a few simple functions for putting a non-threaded program to sleep. you can select the time resolution you want / need:

seconds: z_sleep()
milliseconds: z_msleep()
microseconds: z_usleep()

[C] functions (aka subroutines):

z_sleep()
SIGNATURE: int z_sleep (count_t n)
SYNOPSIS: sleep for n seconds
 

z_msleep()
SIGNATURE: int z_msleep (count_t n)
SYNOPSIS: sleep for n milliseconds (1/1,000th of a second)
PARAMETERS

  • n - wait time (in milliseconds)
  •  

    z_usleep()
    SIGNATURE: int z_usleep (count_t n)
    SYNOPSIS: sleep "n" microseconds
    DESCRIPTION:
    for highly refined sleeping. Sleeping for a resolution of 1 microsecond is highly dependent on the operating system. This function is substantially different, depending on the OS [System V: poll(); BSD: select(); Microsoft: Sleep(), etc.]