added shared variable monitor_time in train