%scheduleID = schedule(%time_ms, %cancel, %functionName[, %args]);
This will schedule %functionName to be called with %args in %time_ms milliseconds. However, when the time is up, if %cancel is no longer false, the schedule will be aborted.
To cancel a schedule, you can also use this method:
cancel(%scheduleID);
Every object has it's own schedule method, example:
%scheduleID = %obj.schedule(%time_ms, "delete"[, %args]);
When time expires, and the object still exists, %obj.delete(); is called.
$Sim::Time also holds the number of seconds since the game started I believe, so you can use that for other methods.