summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2022-04-18 18:55:58 -0400
committerGarrett D'Amore <garrett@damore.org>2022-04-18 19:00:58 -0400
commitc9b5ca8e6a484d86b2bbc4a178374ec274d5f0b9 (patch)
tree51fc4b77909843303d59147c2802da15697e0814
parent7376b195b721edc61a121a7736e4e87da45f9e94 (diff)
downloadnanomsg-c9b5ca8e6a484d86b2bbc4a178374ec274d5f0b9.tar.gz
Expand grace for timeouts for cloud based CI/CD.
-rw-r--r--src/utils/stopwatch.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/utils/stopwatch.h b/src/utils/stopwatch.h
index 6d09fa6..8f4e29f 100644
--- a/src/utils/stopwatch.h
+++ b/src/utils/stopwatch.h
@@ -1,6 +1,6 @@
/*
Copyright (c) 2012 Martin Sustrik All rights reserved.
- Copyright 2015 Garrett D'Amore <garrett@damore.org>
+ Copyright 2022 Staysail Systems, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"),
@@ -31,12 +31,13 @@
/* Check whether measured time is the expected time (in microseconds).
The upper tolerance is 50ms so that the test doesn't fail even on
very slow or very loaded systems. Likewise on some systems we can
- wind up firing up to a single tick early (Windows), so the lower bound
+ fire up to a single tick early (Windows), so the lower bound
is pretty low. The consequence of this is that programs which specify
- a timeout should be a little more pessimistic (at least 10ms) then they
+ a timeout should be a little more pessimistic (at least 10ms) than they
might otherwise think they need to be. */
#define time_assert(actual,expected) \
- nn_assert (actual > ((expected) - 10000) && actual < ((expected) + 50000));
+ nn_assert (actual > ((expected) - 10000)); \
+ nn_assert ( actual < ((expected) + 500000));
/* Measures time interval in microseconds. */