]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/shimmer/TimeP.nc
added command to set current time from app space.
[tinyos-2.x.git] / tos / platforms / shimmer / TimeP.nc
index 5340939125a0d95d0a5caf3b71ff54d482f561d5..4aa2b981512d0b2d2a0b5a28160c5579fbda25b0 100644 (file)
@@ -74,6 +74,11 @@ extern int snprintf(char *str, size_t len, const char *format, ...) __attribute_
     return SUCCESS;
   }
 
+  command void Time.setCurrentTime(time_t current_time){
+    atomic g_current_time = current_time;
+    g_local_time = call LocalTime64.get();
+  }
+
   void dotick(int force) {
     time_t tick = call LocalTime64.get();
     if (force || tick >= (g_tick_local_time + 32768L*10)) {