mirror of
https://github.com/kuhyx/scripts.git
synced 2026-11-22 22:32:23 +01:00
feat: decrease timeout to 60 seconds
This commit is contained in:
parent
94e9801c35
commit
465c085d9c
@ -150,7 +150,7 @@ function prompt_for_math_solution() {
|
|||||||
while true; do
|
while true; do
|
||||||
current_time=$(date +%s)
|
current_time=$(date +%s)
|
||||||
elapsed=$((current_time - start_time))
|
elapsed=$((current_time - start_time))
|
||||||
remaining=$((120 - elapsed))
|
remaining=$((60 - elapsed))
|
||||||
|
|
||||||
if [[ $remaining -le 0 ]]; then
|
if [[ $remaining -le 0 ]]; then
|
||||||
echo -ne "\r${YELLOW}Time remaining: 0 seconds${NC} "
|
echo -ne "\r${YELLOW}Time remaining: 0 seconds${NC} "
|
||||||
@ -164,7 +164,7 @@ function prompt_for_math_solution() {
|
|||||||
display_pid=$!
|
display_pid=$!
|
||||||
|
|
||||||
# Read user input with timeout
|
# Read user input with timeout
|
||||||
read -t 120 -r user_input
|
read -t 60 -r user_input
|
||||||
read_status=$?
|
read_status=$?
|
||||||
|
|
||||||
# Kill the timer display
|
# Kill the timer display
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user