Function amqp_time_has_past

Synopsis

#include <librabbitmq/amqp_time.h>

int amqp_time_has_past(amqp_time_t time)

Description

No description yet.

Source

Lines 229-244 in librabbitmq/amqp_time.c. Line 120 in librabbitmq/amqp_time.h.

int amqp_time_has_past(amqp_time_t time) {
  uint64_t now_ns;
  if (UINT64_MAX == time.time_point_ns) {
    return AMQP_STATUS_OK;
  }

  now_ns = amqp_get_monotonic_timestamp();
  if (0 == now_ns) {
    return AMQP_STATUS_TIMER_FAILURE;
  }

  if (now_ns > time.time_point_ns) {
    return AMQP_STATUS_TIMEOUT;
  }
  return AMQP_STATUS_OK;
}





Add Discussion as Guest

Log in to DocsForge