inconsistent results calculating the distance moved by an object

the results are inaccurate the the first print function always prints 6 but the second one in the WaitAndPrint method outputs inconsistent values once it is 13.54 once it’s 13.4 . 13.38 and so on it never give a fixed value. And it is so essential to get the accurate distance the object moves in one second.

   private float speed;

void Start(){

 speed = 7.25f;
    init();
 }

    public void init(){


 print ("before"+transform.position.z);
 StartCoroutine (WaitAndPrint ());
   }

 IEnumerator WaitAndPrint() {

     yield return new WaitForSeconds(1f);
 print ("after"+transform.position.z  );
 }

    void Update() { 

     transform.Translate (Vector3.forward * Time.deltaTime * speed);

     }

This is to be expected. Your game does not run at a fixed frame rate. WaitForSeconds means “wait for this amount of time and then continue execution in the next frame”, so you’re also including the variable frame execution time in your timing.

But there’s an architectural problem here - I can’t think of many games where a distance error of 0.15% should matter - and, if it does for you, you might have to rethink your approach.