A Simple Timer / Stopwatch

Miscellaneous tools
Post Reply
Message
Author
musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

A Simple Timer / Stopwatch

#1 Post by musher0 »

Hello all.

It seems that zigbert's ptimer is not available any more, and the old tcl/tk
"stopwatch" from way back when didn't like my current version of tcl/tk.
I was out of luck, it seemed.

After a period of mourning ;), I woke up one morning and decided to go
web hunting. "It'll cheer me up," I thought to myself.

And lo and behold!, I managed to find another one. (The source URL is in
the script.)

It's a bash script, but when all dressed up like in the attached pic, you can't
tell. And it's not that important, is it, that it be cli or not, since all we want
from such an utility is to be informed of seconds ticking away. And if you
make a *.desktop file for it, you can tell even less.

So here you have it: the sleepenh utility, the countdown.sh script by a guy
named "josch", and my own wrapper with a desktop file as a bonus! :)

Enjoy!
Attachments
Chronometer-0.1a.pet
This version is the same except it displays a timer icon on the taskbar.
(17.15 KiB) Downloaded 148 times
Chronometer-0.1.pet
(9.94 KiB) Downloaded 136 times
Chrono.jpg
(9.53 KiB) Downloaded 228 times
Last edited by musher0 on Tue 20 Dec 2016, 06:11, edited 2 times in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#2 Post by Flash »

So it's like a stopwatch?

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

Almost forgot...

The wrapper acts as a switch:
click on the entry, the timer shows; click on it again, it closes.

Same from terminal.

From terminal you have the additional capacity of getting the countdown
script to run for x time. E.g.:

Code: Select all

countdown.sh 2m
will activate the timer for 2 minutes.

"Josch" explains it better in his doc.

If you want to create a little suspense, you can type:

Code: Select all

countdown.sh 2m;leafpad
This can be useful if for some reason you want to start an executable in
exactly x minutes.

Or hours. Or hours and minutes. Or hours, minutes and seconds.
The syntax is the same as for the sleep utility.

BFN.
Last edited by musher0 on Mon 19 Dec 2016, 03:17, edited 1 time in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#4 Post by musher0 »

Flash wrote:So it's like a stopwatch?
Yep!

It certainly can be used as such.
Just issue the command a 2nd time to stop it.

Or... type

Code: Select all

countdown.sh 2m;aplay /root/puppy-reference/audio/2barks.au
and you've got yourself an egg timer! :)

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#5 Post by musher0 »

I stand corrected...

Zigbert's utility is now called Ptiming, not PTimer,
and it is still available here.

My apologies.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#6 Post by zigbert »

pTiming is a event timer system. pClock is a simpler alternative. Most likely found in your 'Personal' menu.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#7 Post by musher0 »

Thanks for the info, zigbert.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#8 Post by don570 »

Code: Select all

countdown.sh 2m;aplay /root/puppy-reference/audio/2barks.au & yaf-splash -placement top -close box -text "This is a message"
Will it show text as well?
_________________________________________

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#9 Post by musher0 »

don570 wrote:

Code: Select all

countdown.sh 2m;aplay /root/puppy-reference/audio/2barks.au & yaf-splash -placement top -close box -text "This is a message"
Will it show text as well?
_________________________________________
Hi don570.

I'm not telling you! 8) :lol:

Try it!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply