Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 29 Apr 2017, 17:34
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
A Simple Timer / Stopwatch
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
musher0


Joined: 04 Jan 2009
Posts: 10026
Location: Gatineau (Qc), Canada

PostPosted: Sun 18 Dec 2016, 22:30    Post subject:  A Simple Timer / Stopwatch
Subject description: Hehe, it's actually a cli script, but you can't tell!
 

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 Wink, 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! Smile

Enjoy!
Chronometer-0.1a.pet
Description  This version is the same except it displays a timer icon on the taskbar.
pet

 Download 
Filename  Chronometer-0.1a.pet 
Filesize  17.15 KB 
Downloaded  23 Time(s) 
Chronometer-0.1.pet
Description 
pet

 Download 
Filename  Chronometer-0.1.pet 
Filesize  9.94 KB 
Downloaded  20 Time(s) 
Chrono.jpg
 Description   
 Filesize   9.53 KB
 Viewed   183 Time(s)

Chrono.jpg


_________________
musher0
~~~~~~~~~~
« Un insensé sur le trône n'est qu'un singe sur le haut d'un toit. » / "A madman
on the throne is just a monkey on top of a roof." (Bernard de Clervaux)

Last edited by musher0 on Tue 20 Dec 2016, 02:11; edited 2 times in total
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 12468
Location: Arizona USA

PostPosted: Sun 18 Dec 2016, 23:01    Post subject:  

So it's like a stopwatch?
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10026
Location: Gatineau (Qc), Canada

PostPosted: Sun 18 Dec 2016, 23:02    Post subject:  

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:
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:
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.

_________________
musher0
~~~~~~~~~~
« Un insensé sur le trône n'est qu'un singe sur le haut d'un toit. » / "A madman
on the throne is just a monkey on top of a roof." (Bernard de Clervaux)

Last edited by musher0 on Sun 18 Dec 2016, 23:17; edited 1 time in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10026
Location: Gatineau (Qc), Canada

PostPosted: Sun 18 Dec 2016, 23:03    Post subject:  

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:
countdown.sh 2m;aplay /root/puppy-reference/audio/2barks.au
and you've got yourself an egg timer! Smile

BFN.

_________________
musher0
~~~~~~~~~~
« Un insensé sur le trône n'est qu'un singe sur le haut d'un toit. » / "A madman
on the throne is just a monkey on top of a roof." (Bernard de Clervaux)
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10026
Location: Gatineau (Qc), Canada

PostPosted: Wed 21 Dec 2016, 23:33    Post subject:  

I stand corrected...

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

My apologies.

_________________
musher0
~~~~~~~~~~
« Un insensé sur le trône n'est qu'un singe sur le haut d'un toit. » / "A madman
on the throne is just a monkey on top of a roof." (Bernard de Clervaux)
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 6402
Location: Valåmoen, Norway

PostPosted: Thu 22 Dec 2016, 04:53    Post subject:  

pTiming is a event timer system. pClock is a simpler alternative. Most likely found in your 'Personal' menu.
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 10026
Location: Gatineau (Qc), Canada

PostPosted: Thu 22 Dec 2016, 08:21    Post subject:  

Thanks for the info, zigbert.
_________________
musher0
~~~~~~~~~~
« Un insensé sur le trône n'est qu'un singe sur le haut d'un toit. » / "A madman
on the throne is just a monkey on top of a roof." (Bernard de Clervaux)
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 4555
Location: Ontario

PostPosted: Thu 22 Dec 2016, 15:31    Post subject:  

Code:
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?
_________________________________________
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10026
Location: Gatineau (Qc), Canada

PostPosted: Thu 22 Dec 2016, 16:42    Post subject:  

don570 wrote:
Code:
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! Cool Laughing

Try it!

_________________
musher0
~~~~~~~~~~
« Un insensé sur le trône n'est qu'un singe sur le haut d'un toit. » / "A madman
on the throne is just a monkey on top of a roof." (Bernard de Clervaux)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0900s ][ Queries: 12 (0.0067s) ][ GZIP on ]