Set precision to ms (not seconds) but rounded not floored

This commit is contained in:
xdrm-brackets 2017-10-14 16:43:56 +02:00
parent 8f3923ac97
commit 868d229f13
1 changed files with 3 additions and 1 deletions

View File

@ -103,7 +103,9 @@
/* [2] Main loop
=========================================================*/
/* (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');
/* (2) Return status */