473,379 Members | 1,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Re: best way to create a timer/alarm

En Fri, 13 Jun 2008 02:42:53 -0300, Alexnb <al********@gmail.comescribió:
I am wondering what is the best way to create a timer, like an alarm,
once it
reaches a time, it triggers an event. I have a way of doing this but it
seems like it isn't good at all. If it helps at all I am using a Tkinter,
but that probably doesn't mean much.
Actually it *is* very important - such things are done in very different
ways on different GUI libraries.
The way I was doing it was using a
while loop, and just saying while current time is not = to trigger time,
do
nothing, and when it is, do event.
Doing so makes your application irresponsive (frozen) until the time
elapses.
Use the "after" method; see <http://effbot.org/tkinterbook/widget.htm>

--
Gabriel Genellina

Jun 27 '08 #1
0 749

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: fnord | last post by:
Here's what I've got for the timer: ################################# # timer ################################# sub timer { $timeout = 180; $SIG{ALRM} = sub {die;}; eval
3
by: aelhhattabi | last post by:
hi, I'm new to vb.net . I have a problem waking up early. I usually miss my morning classes. I downloaded some alarm clocks of the internet but most of them are huge and have extra...
8
by: Xero | last post by:
Hello. Could anybody suggest a way to create a timer? I want to timer to be displayed to the user, telling he or she how much time has passed. Thanks. -- Xero
1
by: yhlove | last post by:
Hi I want to use a timer in my project so I would be able to set it's value and able to handle the timer event. how can I do that? (for those whi fimiliar with linux systems: I'm looking for...
19
by: UG | last post by:
I just wanted to know whether any timer facility exists in C, as it is not mentioned in K&R 2, or in the ISO Draft. By timer function i mean that when we use standard input function like scanf() or...
4
by: puntino | last post by:
Hi I have created my Alarm, at compile time I don't have any problem, but at run time I receive the follo wing messages: Exception in thread "main" java.lang.NullPointerException at...
0
by: Alexnb | last post by:
I am wondering what is the best way to create a timer, like an alarm, once it reaches a time, it triggers an event. I have a way of doing this but it seems like it isn't good at all. If it helps at...
3
by: Alexnb | last post by:
I am wondering what is the best way to create a timer, like an alarm, once it reaches a time, it triggers an event. I have a way of doing this but it seems like it isn't good at all. If it helps at...
4
by: liu yang | last post by:
I want to build a timer for each thread, and the timer must be thread- safe. How to do that? My environment is Linux and Pthread. Thanks.
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.