Is your timeToTake variable an unsigned type?

Cheers,
Matt

Sangwon Hyun wrote:
Hello,
 
I am trying to measure the execution time of a command that I implemented. For this measurement, I am using SysTimeC.SysTime interface. The part of my code for this measurement is as follows.
 
begin = call SysTime.getTime32();
call GF.gadd(x, y);
end = call SysTime.getTime32();
timeToTake = (end - begin);
 
The problem is that a minus value is assigned into "timeToTake" variable. To omit the minus sign, I have already tried "%lu" format in printf statement. But the printed value was really unreasonable value like 4294961369(about 77 mins).
 
Please let me know what the problem is.
Thanks in advance,
Regards.

_______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to