Commit Graph

2 Commits

Author SHA1 Message Date
Ben Pfaff a837a38209 Implement signal-driven time tracking.
Checking the current time only when a periodic timer expires allows us
to reduce the number of system calls to obtain the current time to 10 per
second (from an arbitrary number) plus one per poll loop.

This fixes poll_block() to properly handle being interrupted.
Otherwise, a timeout longer than the interval between signals will never
complete (because it will restart from the beginning after every
signal).
2008-08-12 15:21:30 -07:00
Ben Pfaff 1e0f761030 New header file timeval.h for time-related functionality. 2008-07-18 13:42:37 -07:00