[Tinyos-help] how to display the current time in dbg msg in TinyOS
2.x
Matthias Gauger
Matthias.Gauger at informatik.uni-stuttgart.de
Fri Jun 1 07:54:55 PDT 2007
> I'd like to display the current time information in a dbg msg in
> TinyOS2.x. I know in TinyOS1.x,such a dbg msg as below can do this.
> dbg(DBG_USR1,"Current time is %d",tos_state.tos_time);
> But in TinyOS2.x,I don't known how to access the current time
> information besides using t.time().But I hope the current time
> information could appear in a dbg msg.Can anybody tell me how can i do this?
You mean the simulation time?
dbg("Test", "%s\n", sim_time_string());
Hope that helps!
Matthias
More information about the Tinyos-help
mailing list