client: time handling and basic event processing