blob: 1074b707786a610a35efa583167f74c8c703a60b [file] [log] [blame]
// Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <zircon/syscalls.h>
#include "private.h"
zx_time_t _zx_deadline_after(zx_duration_t nanoseconds) {
auto now = VDSO_zx_clock_get_monotonic();
zx_time_t deadline;
if (add_overflow(nanoseconds, now, &deadline)) {
return ZX_TIME_INFINITE;
}
return deadline;
}
VDSO_INTERFACE_FUNCTION(zx_deadline_after);