X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fplatforms%2Fshimmer%2FTimeP.nc;h=4aa2b981512d0b2d2a0b5a28160c5579fbda25b0;hb=03f76ac0f600ded5975ced8b8351e1a9837f7977;hp=5340939125a0d95d0a5caf3b71ff54d482f561d5;hpb=80947dbfb5b56d7b65bc51a4518b320643821ab3;p=tinyos-2.x.git diff --git a/tos/platforms/shimmer/TimeP.nc b/tos/platforms/shimmer/TimeP.nc index 53409391..4aa2b981 100644 --- a/tos/platforms/shimmer/TimeP.nc +++ b/tos/platforms/shimmer/TimeP.nc @@ -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)) {