<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IOSleep",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@F@IOSleep"
  },
  "title" : "IOSleep"
}
-->

# IOSleep

Sleep the calling thread for a number of milliseconds.

```
void IOSleep(uint64_t ms);
```

## Parameters

`ms`

The integer number of milliseconds to wait.

## Discussion

This function blocks the calling thread for at least the number of specified milliseconds, giving time to other processes.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)