schedule_once Function

Defined in pyglet.clock

schedule_once(func, delay, *args, **kwargs)

Schedule ‘func’ to be called once after ‘delay’ seconds (can be a float) on the default clock. The arguments passed to ‘func’ are ‘dt’ (time since last function call), followed by any *args and **kwargs given here.

If no default clock is set, the func is queued and will be scheduled on the default clock as soon as it is created.

Parameters:
  • func (function) – The function to call when the timer lapses.
  • delay (float) – The number of seconds to wait before the timer lapses.

Previous topic

schedule_interval_soft Function

Next topic

set_default Function