From 3e83192454fbcaa4e6ef18c8fc3c76f15494877a Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Wed, 7 May 2014 20:57:14 -0700 Subject: Use gethrtime() on HP-UX for timers. HP-UX does not have clock_gettime(CLOCK_MONOTONIC), instead use platform-specific gethrtime() function. Thanks to zhongk for this fix. --- librabbitmq/amqp_timer.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'librabbitmq/amqp_timer.c') diff --git a/librabbitmq/amqp_timer.c b/librabbitmq/amqp_timer.c index 95606b8..2b41c83 100644 --- a/librabbitmq/amqp_timer.c +++ b/librabbitmq/amqp_timer.c @@ -90,12 +90,16 @@ amqp_get_monotonic_timestamp(void) uint64_t amqp_get_monotonic_timestamp(void) { +#ifdef __hpux + return (uint64_t)gethrtime(); +#else struct timespec tp; if (-1 == clock_gettime(CLOCK_MONOTONIC, &tp)) { return 0; } return ((uint64_t)tp.tv_sec * AMQP_NS_PER_S + (uint64_t)tp.tv_nsec); +#endif } #endif /* AMQP_POSIX_TIMER_API */ -- cgit v1.2.1 From bfd8cc9129da46136691a88c06d505b78f0043ae Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Tue, 26 Aug 2014 21:31:42 -0700 Subject: Update copyright on files changed in 2014. --- librabbitmq/amqp_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'librabbitmq/amqp_timer.c') diff --git a/librabbitmq/amqp_timer.c b/librabbitmq/amqp_timer.c index 2b41c83..46410dc 100644 --- a/librabbitmq/amqp_timer.c +++ b/librabbitmq/amqp_timer.c @@ -1,6 +1,7 @@ /* vim:set ft=c ts=2 sw=2 sts=2 et cindent: */ /* - * Copyright 2013 Alan Antonuk + * Portions created by Alan Antonuk are Copyright (c) 2013-2014 Alan Antonuk. + * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), -- cgit v1.2.1