Use monotonic time for events

This avoids possible problems when wall-clock time is adjusted.