//LOGS *X.log
TEAM ENVI^ ENVIMODE=1| ENVI^ FORCELOCAL=1
_sub Tutc * 
   @date a3 utc
   date a4 utc
   CALC  #e= %a4% - %a3%
   IFEX $%e%>0, IFEX $%e%<%m%, SET m=%e%  //取最小非0时间 
   CALC  #d= %e% + %d%
_end
_sub Tuptime * 
   @date a3 uptime
   date a4 uptime
   CALC  #e= %a4% - %a3%
   IFEX $%e%>0, IFEX $%e%<%m%, SET m=%e%  //取最小非0时间 
   CALC  #d= %e% + %d%
_end

_sub Tuptimens * 
   @date a3 uptimens
   date a4 uptimens
   CALC  #e= %a4% - %a3%  
   IFEX $%e%>0, IFEX $%e%<%m%, SET m=%e%  //取最小非0时间 
   CALC  #d= %e% + %d%
_end

SET &a=| SET &d=| SET &a3=| SET &a4=| SET &m=| SET &e=

TEAM set d=0| set a=10000| SET m=9999999999
loop #%a%>0,team call Tutc  | CALC #a=%a% - 1 
CALC jam=%m%  / 10#01
CALC #ja= %d% / 100000   //0.1us=>us

TEAM set d=0| set a=10000| SET m=9999999999
loop #%a%>0,team call Tuptime | CALC #a=%a% - 1 
CALC jbm=%m% * 1000 
CALC jbus= %d% / 10##01   //ms=>us
CALC jbms= %d% / 10000##04   //ms

TEAM set d=0| set a=10000| SET m=9999999999
loop #%a%>0,team call Tuptimens | CALC #a=%a% - 1 
CALC jcm=%m%  / 1000##03
CALC jc= %d%   / 10000000##06   //ns=>us

mess  utc精度为%jam%us  平均%ja%us  \n uptime精度为%jbm%us 平均%jbms%ms %jbus%us  \n uptimens精度为%jcm%us  平均%jc%us   


// utc精度为4.5us  平均4us  
// uptime精度为1000us 平均0.004ms 3.6us   //实际很多 0 ,平均4us 
// uptimens精度为4.016us  平均4.266114us

//旧版测试：
// utc精度为1000us  平均5us                      //精度1ms
// uptime精度为16000us 平均0.008ms 7.8us         //精度16ms 大概1/64秒

