implement process_end_time, add test, issue #34