-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #463 from fractaledmind/statement-timeout
Add `statement_timeout=` method
- Loading branch information
Showing
9 changed files
with
85 additions
and
2 deletions.
There are no files selected for viewing
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
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,20 @@ | ||
#define timespecclear(tsp) (tsp)->tv_sec = (tsp)->tv_nsec = 0 | ||
#define timespecisset(tsp) ((tsp)->tv_sec || (tsp)->tv_nsec) | ||
#define timespecisvalid(tsp) \ | ||
((tsp)->tv_nsec >= 0 && (tsp)->tv_nsec < 1000000000L) | ||
#define timespeccmp(tsp, usp, cmp) \ | ||
(((tsp)->tv_sec == (usp)->tv_sec) ? \ | ||
((tsp)->tv_nsec cmp (usp)->tv_nsec) : \ | ||
((tsp)->tv_sec cmp (usp)->tv_sec)) | ||
#define timespecsub(tsp, usp, vsp) \ | ||
do { \ | ||
(vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ | ||
(vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ | ||
if ((vsp)->tv_nsec < 0) { \ | ||
(vsp)->tv_sec--; \ | ||
(vsp)->tv_nsec += 1000000000L; \ | ||
} \ | ||
} while (0) | ||
#define timespecafter(tsp, usp) \ | ||
(((tsp)->tv_sec > (usp)->tv_sec) || \ | ||
((tsp)->tv_sec == (usp)->tv_sec && (tsp)->tv_nsec > (usp)->tv_nsec)) |
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