-
-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
35 additions
and
50 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# nng_duration | ||
|
||
## NAME | ||
|
||
nng_duration --- relative time in milliseconds | ||
|
||
## SYNOPSIS | ||
|
||
```c | ||
#include <nng/nng.h> | ||
|
||
typedef int32_t nng_duration; | ||
|
||
#define NNG_DURATION_INFINITE (-1) | ||
#define NNG_DURATION_DEFAULT (-2) | ||
#define NNG_DURATION_ZERO (0) | ||
``` | ||
## DESCRIPTION | ||
An {{i:`nng_duration`}}{{hi:duration}} is a relative time, measured in {{i:milliseconds}}. | ||
This type is most often used in conjunction with timers and timeouts. | ||
A couple of special values have been set aside, and carry special meanings. | ||
- {{i:`NNG_DURATION_DEFAULT`}}: | ||
Indicates a context-specific default value should be used. | ||
- {{i:`NNG_DURATION_INFINITE`}}: | ||
Effectively an infinite duration; used most often to disable timeouts. | ||
- {{i:`NNG_DURATION_ZERO`}}: | ||
Zero length duration; used to perform an immediate poll. |