Hello,guys. I have a problem to use time interface of SimpleTimeM.
I tried to get the system time and I find the interface 'time' can do this
job.

This is the interface:
interface Time {
  /**
   * get current time. Return it in tos_time_t structure
   **/
  async command tos_time_t get();
  /** get the high 32 bits of current time */
  async command uint32_t getHigh32();
  /** get the lower 32 bits of current time */
  async command uint32_t getLow32();
  /** get clock phase offset since last clock tick
    * in unit of micro-seconds.
   **/
  async command uint16_t getUs();
}

So, in my function, I write:

atomic pack->xData.datap1.time_high=call Time.getHigh32();
atomic pack->xData.datap1.time_low=call Time.getLow32();

However, I always get 0. I tried to find the problem.
First, I write:
atomic pack->xData.datap1.time_high=1111;
And then I made sure that above part is right.
So the problem should be in 'call Time.getHigh32()'.

So how can I fix this problem. Why I always get the 0 of the system time?
Thanks guys!!!!




-----Chenda Liao
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to