samedi 2 mai 2015

How do I get current Unix time in nanoseconds in Android Shell?

I need to get timestamps in nanoseconds in Android shell. Using date command (from busybox and Cyanogenmod) returns to me this:

@A001 # date +%s.%N
1819.N

The only other working option that I found is using www.timeapi.org.

curl -sSw'\n' http://ift.tt/1c8UVjE >> ctime_tar.txt

However, it requires connection and also takes 0.1 seconds to execute.

What can I use? I really need to get time in nanoseconds, especially something I can execute as a single command.

Aucun commentaire:

Enregistrer un commentaire