x730-script icon indicating copy to clipboard operation
x730-script copied to clipboard

x730-script needs fix for date

Open michaelu123 opened this issue 4 years ago • 0 comments

A few years ago the Unix time in seconds gained one more digit. Since then, the code date +%s%N | cut -b1-13 must be changed to date +%s%N | cut -b1-12 to obtain a number measuring 1/100 of a second. To verify:

x1=`date +%s%N | cut -b1-12`; sleep 5; x2=`date +%s%N | cut -b1-12`;expr $x2 - $x1

returns a number close to 500.

michaelu123 avatar Aug 02 '20 10:08 michaelu123