Added the ability to have time correlated events in a thread-safe manner
using locks.