Blog Archive

Friday, January 26, 2018

bash - Linux command to get time in seconds, milliseconds, nanoseconds

bash - Linux command to get time in milliseconds - Stack Overflow:



To get seconds:

date +%s

To get nanoseconds:

date +%s.%N 

To get milliseconds:

echo $(($(date +%s%N)/1000000))



'via Blog this'

No comments:

Post a Comment