Skip to main content
3 of 5
added 161 characters in body
Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k

As a starting point I'll write up what I found about these functions before. I'm hoping someone will take a better look at them and will write a more complete answer.


Spelunking in version 8,

Internal`AddPeriodical[Print["boo!"], 3]

Now you get a boo! every 3 seconds.

Internal`Periodicals[]

(* ==> Print["boo!"] *)

Now do

Internal`RemovePeriodical[Print["boo!"]]

to stop it.

Internal`Periodicals[]

(* ==> {} *)

Note that AddPeriodical and RemovePeriodical have HoldFirst.

I don't know what Internal`$ThisPeriodical is, but I suspect it might have a special value during the execution of a periodical (no time to spelunk more, sorry!)

Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k