PERL: Stopwatch + record


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting PERL: Stopwatch + record
# 1  
Old 05-15-2003
PERL: Stopwatch + record

Is it possible to make a perl or cgi script that does the following ?

1) have a stopwatch with a start / start / pause feature and record the time its paused on. but be able to record up to ten different times
2)print the recorded time to .txt file
# 2  
Old 05-16-2003
I don't have any sample code for you this is what I am thinking:

Make the start/stop/pause buttons so they post back to the same cgi and pass the time. You can push each time into an array. You can then subtract array[0] from array[1] to get the first time, array[1] from array[2] to get the second time, etc until the stop button is pressed which you would use as the last time.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need code for updating second record to first record in shell scripting

Hi,, I have requirement that i need to get DISTINCT values from a table and if there are two records i need to update it to one record and then need to submit INSERT statements by using the updated value as a parameter. Here is the example follows.. SELECT DISTINCT ID FROM OFFER_GROUP WHERE... (1 Reply)
Discussion started by: Samah
1 Replies

2. Shell Programming and Scripting

Extract timestamp from first record in xml file and it checks if not it will replace first record

I have test.xml <emp><id>101</id><name>AAA</name><date>06/06/14 1811</date></emp> <Join><id>101</id><city>london</city><date>06/06/14 2011</date></join> <Join><id>101</id><city>new york</city><date>06/06/14 1811</date></join> <Join><id>101</id><city>sydney</city><date>06/06/14... (2 Replies)
Discussion started by: vsraju
2 Replies

3. Shell Programming and Scripting

How to compare current record,with next and previous record in awk without using array?

Hi! all can any one tell me how to compare current record of column with next and previous record in awk without using array my case is like this input.txt 0 32 1 26 2 27 3 34 4 26 5 25 6 24 9 23 0 32 1 28 2 15 3 26 4 24 (7 Replies)
Discussion started by: Dona Clara
7 Replies

4. Linux

perl program to delete the complete record

Hi all, I want a perl program to delete the record and its contents from a file if there is no particular line in the record given that all records are separated by a blank line. For example: #100 abcd efgh hijk 123 klm #200 abcd efgh hijk klm So, the pattern here is 123. If... (0 Replies)
Discussion started by: kaav06
0 Replies

5. Shell Programming and Scripting

Reject the record if the record in the next line does not satisfy the pattern

Hi, I have a input file with the following entries: 1one 2two 3three 1four 2five 3six 1seven 1eight 1nine 2ten The output should be 1one 2two 3three 1four 2five 3six (2 Replies)
Discussion started by: supchand
2 Replies

6. UNIX for Dummies Questions & Answers

Perl Script to delete record if it exceeds 199 fields

HI All, I am new to perl ,need your inputs for my better understanding. I have 5 UNIX files ,inside which only required fields will be loaded except with junk data mentioned in double quotes .For Ex File has below information: Process=High Name=Albert Age=27 ... (8 Replies)
Discussion started by: Perlbaby
8 Replies

7. Shell Programming and Scripting

Making a stopwatch function

#The first part of this works fine a period prints every 15 seconds (ping –c 3, takes 2 seconds). However no “Minutes since start = “ message prints. #By all rights it should print 2 times once when it is outputted from “grep” and a second time when cat reads it. I would use cron but I am not... (4 Replies)
Discussion started by: ifthanwhile
4 Replies

8. Shell Programming and Scripting

PERL: Extract random record which has 4 lines each

Hi, I have a data file with millions of record (N). Each record was saved in 4 lines. So there are total of NX4 lines in the data file. For Example: Host1 a b c d Host2 e f g h Host3 i j k (2 Replies)
Discussion started by: phoeberunner
2 Replies

9. Shell Programming and Scripting

Inserting into first record using perl

hi all... i got some requirment where i need to insert some values into first record of flat file. i am using perl for that job. var1=456 var2=789 echo `perl -p -i -e "s/U/\${var1}U${var2}/g;" myFile.txt` but it is writing into all records which has U.... can anyone help me out in this... (7 Replies)
Discussion started by: shreekrishnagd
7 Replies

10. Shell Programming and Scripting

How to implement stopwatch in bash?

I want to time how long it takes to run some programmes and report the delta time in days, hours, minutes and seconds using a simple echo. Does someone have a simple bash script to do this? Thanks, siegfried (2 Replies)
Discussion started by: siegfried
2 Replies
Login or Register to Ask a Question