Quantcast
Channel: How to get milliseconds since Unix epoch? - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 6

How to get milliseconds since Unix epoch?

$
0
0

I want to do a bash script that measures the launch time of a browser for that I am using an html which gets the time-stamp on-load in milliseconds using JavaScript.

In the shell script just before i call the browser I get the time-stamp with:

date +%s

The problem is that it gets the time-stamp in seconds, and I need it in milliseconds since sometimes when ran a second time the browser starts in under a second and I need to be able to measure that time precisely using milliseconds instead of seconds.

How can I get the time-stamp in milliseconds from a bash script?


Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>