assume unit for all timestamp is millisecond