John, I’ll try with that!

Etienne, i use to compile openwrt, in the next compilation I'll try that nanoseconds support.

Thanks both for your answers.

Best regards

Gabriel


El 26/11/12 18:03, Etienne Champetier escribió:
Hi

if you know how to compile openwrt yourself, you can activate nanoseconds 
support for date command in:
Base system / busybox / coreutils / Support %[num]N nanosecond format specifier
BUSYBOX_CONFIG_FEATURE_DATE_NANO is in trunk since
https://dev.openwrt.org/changeset/22665/trunk/package/busybox/config/coreutils/Config.in

/proc/uptime is a good trick, thanks for this one

Le 23/11/2012 21:24, John Lauro a écrit :
If you want to do multiple commands with time, either put them in a script and 
time the script, or do something like:

echo "command 1 ; command 2" | time sh



----- Original Message -----
From: "Gabriel" <gto...@inti.gob.ar>
To: openwrt-devel@lists.openwrt.org
Sent: Friday, November 23, 2012 3:14:09 PM
Subject: Re: [OpenWrt-Devel] milliseconds time measurements

Thank you for your answers!

I've tried with the time command, but I couldn't use it for various
commands together as in my pc using parentheses like

time (command 1; command 2)

with date +%s I get a seconds count:

root@E10:~# while true; do date; date +%s; sleep 1; done
Fri Nov 23 17:10:11 ART 2012
1353701411
Fri Nov 23 17:10:12 ART 2012
1353701412
Fri Nov 23 17:10:13 ART 2012
1353701413

Regarding /proc/uptime, I didn't know about it, I think will be enough
for what I wanted!

Best regards

Gabriel


El 23/11/12 13:56, Bastian Bittorf escribió:
/proc/uptime is much simplier :-)
and it's even monotonic...and...fast.
(date +%s can jump into future and past)

read t1 trash </proc/uptime
do_something()
read t2 trash </proc/uptime
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to