Skip to content

add time limit functions #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 6, 2025
Merged

add time limit functions #348

merged 2 commits into from
Apr 6, 2025

Conversation

kkos
Copy link
Owner

@kkos kkos commented Apr 5, 2025

This feature is disabled by default.
To enable it, simply enable the USE_TIME_LIMIT declaration in src/regint.h.

@@ -81,6 +81,7 @@
#define USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE /* /\n$/ =~ "\n" */
#define USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR
#define USE_RETRY_LIMIT
/* #define USE_TIME_LIMIT */

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

Copilot Autofix

AI 12 days ago

The best way to fix the problem is to remove the commented-out code if it is no longer needed. If the code is still relevant and might be used in the future, it should be properly documented to explain its purpose. In this case, we will remove the commented-out code to clean up the codebase and avoid confusion.

  • Remove the commented-out line /* #define USE_TIME_LIMIT */ from the file src/regint.h.
  • No additional methods, imports, or definitions are needed to implement this change.
Suggested changeset 1
src/regint.h

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/regint.h b/src/regint.h
--- a/src/regint.h
+++ b/src/regint.h
@@ -83,3 +83,3 @@
 #define USE_RETRY_LIMIT
-/* #define USE_TIME_LIMIT */
+
 #ifdef USE_GOTO_LABELS_AS_VALUES
EOF
@@ -83,3 +83,3 @@
#define USE_RETRY_LIMIT
/* #define USE_TIME_LIMIT */

#ifdef USE_GOTO_LABELS_AS_VALUES
Copilot is powered by AI and may make mistakes. Always verify output.
@kkos kkos merged commit 2539b8a into master Apr 6, 2025
3 of 6 checks passed
@tonco-miyazawa
Copy link

Additional Information: Setting a time limit

/src/regint.h#L113
#define DEFAULT_TIME_LIMIT_MSEC 0 /* unlimited (msec.) */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants