Time can be a real number, but the actual granularity of how fine the elapsed time is measured is operating system dependent, and the triggering condition is actually that at least Time seconds have elapsed. In addition, the processing of an event may not happen immediately upon the raising the event, as other event may also need to be processed at the same time.
To ensure the correct behaviour for timed events, the event handler for the event must not fail (or else it could cause some raised events to be not processed), and it should execute at priority 1 (so that it cannot be interupted).
The elapsed time is generally measured in elapsed user time, except for systems that cannot support this, such as Microsoft Windows. In this case, the time is measured in elapsed real time.
setup :- set_event_handler(hi, hi/0), % set up event `hi' to occur once 3.2 seconds later % and the hi event will trigger the execution of hi/0. event_after(hi, 3.2). hi :- writeln(hi).