Who says it's negative? When a signed integer's top bit gets set it "becomes" negative. Somewhere along the way your unsigned variable is being mis-interpreted. Often the default behavior is signed, so make sure you are using the right declarations and casts.
Java doesn't know from unsigned, so the negative might be an artifact of your tracing technique. MS Robert Smith wrote: > Hi, > > I am currently using TinyOS2.x, and tyring to use microseconds in mica > platform. > I used CounterMicro32C to get microsec counter, and after awhile, the > return value becomes negative value. > CounterMicro32C provides interface Counter with uint32_t format, but why > am I getting negative values from this? > > Best Regards, > Rob > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
