tcp_schedule_wakeup(+Timeval, +Term)

This schedules a wakeup from tcp_select/1 (see ipc-tcp-trm-select1). For example,

     tcp_now(Now),
     tcp_time_plus(Now, 0.1, Timeval),
     tcp_schedule_wakeup(Timeval, foo)
     

forces tcp_select/[1,2] to return the term wakeup(foo) a tenth of a second after the call to tcp_now/1. Any number of wakeups may be pending.

The wakeup mechanism is implemented in terms of timer alarms. If a timer alarm was delivered when the process was not waiting at select, the next call to select will indicate that an alarm was delivered.

The wakeup mechanism can be used independently of the rest of the tcp package. You need not set up communications with other processes to use the wakeup mechanism.