| 516 Timeouts allow a perl subroutine to be exectued after a specified time. They only occur once, so as stated earlier the timeout must be reregistered after every time it is called. |
516 Timeouts allow a perl subroutine to be exectued after a specified time. They only occur once, so as stated earlier the timeout must be reregistered after every time it is called. |
| 517 |
517 |
| 518 @code |
518 @code |
| 519 sub timeout_cb { |
519 sub timeout_cb { |
| 520 my $plugin = shift; |
520 my $plugin = shift; |
| 521 print "Timeout occured."; |
521 print "Timeout occurred."; |
| 522 |
522 |
| 523 # Reschedule timeout |
523 # Reschedule timeout |
| 524 Gaim::timeout_add($plugin, 10, \&timeout_cb, $plugin); |
524 Gaim::timeout_add($plugin, 10, \&timeout_cb, $plugin); |
| 525 } |
525 } |
| 526 |
526 |