Countdown Timer for Webmin run.cgi using perl

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a perl script that has a countdown timer subroutine that, when ran from a terminal session, overwrites the displayed remaining time every second with the current time remaining. But, when it is ran via webmin run.cgi in a browser, it does NOT overwrite the previous time, it just moves one space to the right of the previous time and writes the new current time remaining to the run.cgi.
Example output to webmin run.cgi in browser:
00:00:58 00:00:57 00:00:56 00:00:55 00:00:54 00:00:53 00:00:52 00:00:51 00:00:50 00:00:49 00:00:48 00:00:47 00:00:46 00:00:45 00:00:44 00:00:43 00:00:42 00:00:41 00:00:40 00:00:39 00:00:38 00:00:37 00:00:36 00:00:35 00:00:34 00:00:33 00:00:32 00:00:31 00:00:30 00:00:29 00:00:28 00:00:27 00:00:26
Countdown timer code:
sub reload_router = 1;
my $beg_time = time;
my $end_time = $beg_time + $countdown;
for (;;) ++;
sleep(1);
print("rReboot Completed!n");
I have a PDF and PNG screenshot of the output if that would help, but I don't have access to an external image repository where I can upload it.
perl webmin cgi
add a comment |Â
up vote
0
down vote
favorite
I have a perl script that has a countdown timer subroutine that, when ran from a terminal session, overwrites the displayed remaining time every second with the current time remaining. But, when it is ran via webmin run.cgi in a browser, it does NOT overwrite the previous time, it just moves one space to the right of the previous time and writes the new current time remaining to the run.cgi.
Example output to webmin run.cgi in browser:
00:00:58 00:00:57 00:00:56 00:00:55 00:00:54 00:00:53 00:00:52 00:00:51 00:00:50 00:00:49 00:00:48 00:00:47 00:00:46 00:00:45 00:00:44 00:00:43 00:00:42 00:00:41 00:00:40 00:00:39 00:00:38 00:00:37 00:00:36 00:00:35 00:00:34 00:00:33 00:00:32 00:00:31 00:00:30 00:00:29 00:00:28 00:00:27 00:00:26
Countdown timer code:
sub reload_router = 1;
my $beg_time = time;
my $end_time = $beg_time + $countdown;
for (;;) ++;
sleep(1);
print("rReboot Completed!n");
I have a PDF and PNG screenshot of the output if that would help, but I don't have access to an external image repository where I can upload it.
perl webmin cgi
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a perl script that has a countdown timer subroutine that, when ran from a terminal session, overwrites the displayed remaining time every second with the current time remaining. But, when it is ran via webmin run.cgi in a browser, it does NOT overwrite the previous time, it just moves one space to the right of the previous time and writes the new current time remaining to the run.cgi.
Example output to webmin run.cgi in browser:
00:00:58 00:00:57 00:00:56 00:00:55 00:00:54 00:00:53 00:00:52 00:00:51 00:00:50 00:00:49 00:00:48 00:00:47 00:00:46 00:00:45 00:00:44 00:00:43 00:00:42 00:00:41 00:00:40 00:00:39 00:00:38 00:00:37 00:00:36 00:00:35 00:00:34 00:00:33 00:00:32 00:00:31 00:00:30 00:00:29 00:00:28 00:00:27 00:00:26
Countdown timer code:
sub reload_router = 1;
my $beg_time = time;
my $end_time = $beg_time + $countdown;
for (;;) ++;
sleep(1);
print("rReboot Completed!n");
I have a PDF and PNG screenshot of the output if that would help, but I don't have access to an external image repository where I can upload it.
perl webmin cgi
I have a perl script that has a countdown timer subroutine that, when ran from a terminal session, overwrites the displayed remaining time every second with the current time remaining. But, when it is ran via webmin run.cgi in a browser, it does NOT overwrite the previous time, it just moves one space to the right of the previous time and writes the new current time remaining to the run.cgi.
Example output to webmin run.cgi in browser:
00:00:58 00:00:57 00:00:56 00:00:55 00:00:54 00:00:53 00:00:52 00:00:51 00:00:50 00:00:49 00:00:48 00:00:47 00:00:46 00:00:45 00:00:44 00:00:43 00:00:42 00:00:41 00:00:40 00:00:39 00:00:38 00:00:37 00:00:36 00:00:35 00:00:34 00:00:33 00:00:32 00:00:31 00:00:30 00:00:29 00:00:28 00:00:27 00:00:26
Countdown timer code:
sub reload_router = 1;
my $beg_time = time;
my $end_time = $beg_time + $countdown;
for (;;) ++;
sleep(1);
print("rReboot Completed!n");
I have a PDF and PNG screenshot of the output if that would help, but I don't have access to an external image repository where I can upload it.
perl webmin cgi
perl webmin cgi
edited 14 mins ago
Rui F Ribeiro
37.8k1475120
37.8k1475120
asked 30 mins ago
PCnetMD
6
6
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478724%2fcountdown-timer-for-webmin-run-cgi-using-perl%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password