GetTimeOfDay Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I want to find the data transfer time
 
I have code like this 
 

  timeRetVal = gettimeofday(&tp,&tz);
  if(timeRetVal != -1)
        lStartTime = tp.tv_usec;

Transferdata();

  timeRetVal = gettimeofday(&tp,&tz);
  if(timeRetVal != -1)
  {
       lEndTime = tp.tv_usec;
       }

lTime = lEndTime - lStartTime;

 

How come some times lEndTime value is less than lStartTime value is there any other function to get the tick count.

Thanks
      
 

 
 
 

 


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux