cement.ext.ext_alarm

Cement alarm extension module.

class cement.ext.ext_alarm.AlarmManager(*args: Any, **kw: Any)[source]

Bases: object

Lets the developer easily set and stop an alarm. If the alarm exceeds the given time it will raise signal.SIGALRM.

set(time: int, msg: str) None[source]

Set the application alarm to time seconds. If the time is exceeded signal.SIGALRM is raised.

Parameters:
  • time (int) – The time in seconds to set the alarm to.

  • msg (str) – The message to display if the alarm is triggered.

stop() None[source]

Stop the application alarm.