1# zx_deadline_after 2 3## NAME 4 5<!-- Updated by update-docs-from-abigen, do not edit. --> 6 7deadline_after - Convert a time relative to now to an absolute deadline 8 9## SYNOPSIS 10 11<!-- Updated by update-docs-from-abigen, do not edit. --> 12 13``` 14#include <zircon/syscalls.h> 15 16zx_time_t zx_deadline_after(zx_duration_t nanoseconds); 17``` 18 19## DESCRIPTION 20 21`zx_deadline_after()` is a utility for converting from now-relative durations 22to absolute deadlines. If *nanoseconds* plus the current time is bigger than the 23maximum value for `zx_time_t`, the output is clamped to **ZX_TIME_INFINITE**. 24 25## RIGHTS 26 27<!-- Updated by update-docs-from-abigen, do not edit. --> 28 29TODO(ZX-2399) 30 31## RETURN VALUE 32 33`zx_deadline_after()` returns the absolute time (with respect to **ZX_CLOCK_MONOTONIC**) 34that is *nanoseconds* nanoseconds from now. 35 36## ERRORS 37 38`zx_deadline_after()` does not report any error conditions. 39 40## EXAMPLES 41 42``` 43// Sleep 50 milliseconds 44zx_time_t deadline = zx_deadline_after(ZX_MSEC(50)); 45zx_nanosleep(deadline); 46``` 47 48## SEE ALSO 49 50 51[ticks_get](ticks_get.md) 52