How to get timestamp since epoch in Windows?
7,527
You may not like this ...
Load cygwin onto your PC (www.cygwin.org)
create a script that executes commands
date +%s.%N
your_applicaiton
date +%s.%N
Open a bash shell
Run the script
Get output like
1369457045.186880000
1369457053.766895000
Related videos on Youtube
Author by
Eduard Florinescu
Coding my way out of boredom. “If the fool would persist in his folly he would become wise.” (William Blake)
Updated on September 18, 2022Comments
-
Eduard Florinescu over 1 year
I want to measure the time of start for a program but for this I want to get the timestamp in Windows, but I need to get the time-stamp in mili-seconds since the Unix epoch format. (The Unix epoch is the time
00:00:00 UTC
on1 January 1970
(or1970-01-01T00:00:00Z
ISO 8601
).)How can I get timestamp in milseconds since Unix epoch through a Windows command?
-
Richard about 11 yearsHave you looked at this question? stackoverflow.com/questions/3454112/…
-
Eduard Florinescu about 11 years@Richard No, but I looked now and 1) first answer is in seconds. 2) second answer is not so clear. 3) seems to be about epoch in general not Unix epoch. 4) I need something to get the time stamp without getting too much overhead and I don't know how much it takes to run cscript.
-