Mohd Khalid Kasmin wrote:

> the first two will work, while the second pair won't.

I am suprised any of them did work. t1 & z1 are uninitialized pointers
that may point to any memory location.

Always use -Wall when compiling programs, it traps most simple errors.

The code should read

  struct timeval t1,t2;

  gettimeofday(&t1,NULL);
  ...
  gettimeofday(&t2,NULL);

(you don't need to get tz unless you want it...)

---
Henrik Nordström

Reply via email to