4.45 Miscellaneous
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Miscellaneous
          • dwim_match/2
          • dwim_match/3
          • wildcard_match/2
          • wildcard_match/3
          • sleep/1
    • Packages
Availability:built-in
sleep(+Time)
Suspend execution Time seconds. Time is either a floating point number or an integer. Granularity is dependent on the system's timer granularity. A negative time causes the timer to return immediately. On most non-realtime operating systems we can only ensure execution is suspended for at least Time seconds.

On Unix systems the sleep/1 predicate is realised ---in order of preference--- by nanosleep(), usleep(), select() if the time is below 1 minute, or sleep(). On Windows systems Sleep() is used.