You are not logged in.

#1 2008-08-03 23:39:26

RAH
Member
Registered: 2008-06-20
Posts: 205

[SOLVED] Timer

Hello,

I need some sort of timing application, something like a stopwatch.  I would be running multiple instances and be able to pause them individually etc.  Any ideas?

Thanks.

Last edited by RAH (2008-08-05 11:25:43)

Offline

#2 2008-08-04 02:41:08

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: [SOLVED] Timer

How 'fancy' do you need it to be? Do you need to see the seconds ticking away, or just the final time?

Absolute most basic thing you can do would be open a terminal, then enter the command:

time read -p "Press enter to stop"

That will start the clock, then when you press enter again, it will stop the clock and show you the elapsed time next to the row labelled "real" smile

Offline

#3 2008-08-04 11:20:48

RAH
Member
Registered: 2008-06-20
Posts: 205

Re: [SOLVED] Timer

Thanks - that's a really handy command you have there.  Is there anyway of pausing/resuming instead of just stopping it?

Offline

#4 2008-08-04 12:08:22

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: [SOLVED] Timer


Be yourself, because you are all that you can be

Offline

#5 2008-08-04 12:19:18

RAH
Member
Registered: 2008-06-20
Posts: 205

Re: [SOLVED] Timer

Thanks but I'm not really looking for a widget.

Offline

#6 2008-08-05 05:04:16

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: [SOLVED] Timer

RAH wrote:

Thanks - that's a really handy command you have there.  Is there anyway of pausing/resuming instead of just stopping it?

No sad
(Not that I'm aware of anyway!)

You could do a hack:

time read ; time read

When you stop the first one, the second will immediately start, then you'll have the time of the first, time of the second, and you can add the 2 together to get the total.

Offline

#7 2008-08-05 05:12:48

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: [SOLVED] Timer

Someone at the NIST actually has a nice simple (TCL) script that's a simple, visual stopwatch. I think it's what you're looking for. I have it in the AUR: http://aur.archlinux.org/packages.php?ID=14399

You can run multiple instances of it and within each one take multiple time recordings, stop, restart, or clear both a total and a "lap" timer. I use it for everything stopwatch-related that I need.

Offline

#8 2008-08-05 16:18:38

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: [SOLVED] Timer

I thought he was not looking for a GUI app. I tried giving him a similar code too


Be yourself, because you are all that you can be

Offline

#9 2008-08-05 16:23:32

RAH
Member
Registered: 2008-06-20
Posts: 205

Re: [SOLVED] Timer

The commands which fukawi2 provided should do the job for the most part.  Thanks everyone.

Offline

#10 2008-08-05 17:33:11

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: [SOLVED] Timer

ScriptDevil wrote:

I thought he was not looking for a GUI app. I tried giving him a similar code too

He had not said so, but based on what he decided to use it would seem that you're correct.

Offline

Board footer

Powered by FluxBB