[Tutor] regexing and timing, seperatly

Galen O'Neil goneil@scu.edu
07 Oct 2002 22:55:59 -0700


1.  I can't seem to find a simple tutorial or example on timing.  I want
an infinite loop but I don't want it to eat all my cpu time.  I've
looked at a few programs that use tkinter and root.mainloop() but I
can't imagine there aren't some other ways that don't involve tkinter. 
So if anybody knows where I can find a decent tutorial or has some
sample code, that would be great.

> this is not clear.  Are you trying to have a timer so that your program does 
> something on certain intervals?

I want something like this that doesn't eat up all the cpu time.  So it
would either do it every x amount of time or, do it only when getdata()
would return new data.  I'm having a hard time expressing this exactly
because I don't know what options are available.

while 1:
	data = getdata()
	myfunction(data)



Also, thank you Sean 'Shaleh' Perry, I knew my problem with regexing was
something simple I was missing.