CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [BillKSmith] Sorting data: Edit Log



Akotb
Novice

Sep 10, 2016, 11:11 PM


Views: 10571
Re: [BillKSmith] Sorting data

I found a glitch in the program. It was shown before, but I probably did not betray this value. The problem is in the first round. First circle as such does not exist, it is a zero circle from which the countdown begins. System timer starts from the time when the equipment is turned on.
When counting the first round, I consider the following:

my $previousTime = 0;
foreach my $currTime (@{$rez->{$name}}) {
my $delta = sprintf "%.3f", $currTime - $previousTime;
$previousTime = $currTime;}

The time value in the first round is not displayed correctly.
As a result, best lap timel - it's the first lap time. But this is not the case.
First lap display is not required. The total number of laps on one lap less.
But how to implement it?

and I have all the time values are displayed in seconds. Is it possible to implement the transfer of seconds in a minutes?


I solved the problem with the first round in my code. Here's how I did it
my $ ring = 0; Change the value of the first round to 0
and little changed O line
if ($ delta = $ currTime!) {print $ out "$ ring | \ t $ delta \ n \ n"; }

Now I would like to change the reading of the first round in your code. How can I do it?
And how do you recommend to change the time display from seconds to minutes

From
1 | Jaime Lannister | 130.430 | 9 | 89.656
To
1 | Jaime Lannister | 2:10.430 | 8 | 2:10.430


(This post was edited by Akotb on Sep 11, 2016, 10:27 AM)


Edit Log:
Post edited by Akotb (Novice) on Sep 10, 2016, 11:16 PM
Post edited by Akotb (Novice) on Sep 11, 2016, 10:27 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives