Set precision to ms (not seconds) but rounded not floored
This commit is contained in:
parent
8f3923ac97
commit
868d229f13
|
@ -103,7 +103,9 @@
|
||||||
/* [2] Main loop
|
/* [2] Main loop
|
||||||
=========================================================*/
|
=========================================================*/
|
||||||
/* (1) Log action to default log file */
|
/* (1) Log action to default log file */
|
||||||
$f_data->fwrite( "[" . floor( $stop_ts - $start_ts ) ."]\n" );
|
$elapsed = $stop_ts - $start_ts;
|
||||||
|
$elapsed = round($elapsed*1000) / 1000;
|
||||||
|
$f_data->fwrite( "[" . $elapsed ."]\n" );
|
||||||
slog("Motor stop", 'motheure-simple:loop', 'motheure');
|
slog("Motor stop", 'motheure-simple:loop', 'motheure');
|
||||||
|
|
||||||
/* (2) Return status */
|
/* (2) Return status */
|
||||||
|
|
Loading…
Reference in New Issue