print out timestamp to files

print out timestamp(in milliseconds) to files
The first timestamp is the event time using system uptime
The second and later timestamp values are the time difference between
its event time and the first sampled time