---
title: HwProgramLatencyTimer
framework: serialdriverkit
role: symbol
role_heading: Instance Method
path: serialdriverkit/iouserserial/hwprogramlatencytimer
---

# HwProgramLatencyTimer

Sets the amount of time to wait before sending the current buffer to the device.

## Declaration

```occ
virtual kern_return_t HwProgramLatencyTimer(uint32_t latency);
```

## Parameters

- `latency`: The number of milliseconds for the device to wait before sending a partial buffer to the host.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.

## Discussion

Discussion Override this method and use it to configure a latency timer for the device. Rather than sending buffers only when they’re full, the latency timer ensures that the hardware sends any accumulated data at the specified interval.

## See Also

### Programming the Modem

- [HwGetModemStatus](serialdriverkit/iouserserial/hwgetmodemstatus.md)
- [SetModemStatus](serialdriverkit/iouserserial/setmodemstatus.md)
- [HwResetFIFO](serialdriverkit/iouserserial/hwresetfifo.md)
- [HwSendBreak](serialdriverkit/iouserserial/hwsendbreak.md)
- [HwProgramBaudRate](serialdriverkit/iouserserial/hwprogrambaudrate.md)
- [HwProgramMCR](serialdriverkit/iouserserial/hwprogrammcr.md)
- [HwProgramUART](serialdriverkit/iouserserial/hwprogramuart.md)
- [Hardware Constants](serialdriverkit/hardware-constants.md)
