View previous topic :: View next topic |
Author |
Message |
dgallo
Joined: 02 Dec 2009 Posts: 16
|
Posted: Thu Jan 07, 2010 2:03 pm Post subject: How to get a "timestamp" and actual time |
|
|
Hi guys,
I'm trying to benchmark some code, and I want to count how long TSIM is taking to process some code. To do so, I would need some kind of timestamp that I could get in the beginning and in the end of the process (actually I will repeat the process n times to get the average).
The only time-related function I've found in the docs is the timer (timer_start, timer_stop, timer_value). In theory I guess I could start a timer (big enough), run my code and then check the timer_value and subtract... But I would like to know if there is any other (simple/better) way to do this.
Also, I want to know if it is possible to get the actual time from the ME, SIM card / Operator... Is it?
Thanks!
Diego |
|
Back to top |
|
|
pz Guest
|
Posted: Thu Jan 07, 2010 3:51 pm Post subject: |
|
|
timer_() calls are STK, cannot be used for this.
I would recommend to use TL2 and "dbg -t". This prints time stamp for every new line so you can easily get all info you need. Speed is the same for TL2/TSIM/Waver/... (but L1/L2 kernel where the actual debug output takes some time).
For actual time use STK provide_date(). |
|
Back to top |
|
|
dgallo
Joined: 02 Dec 2009 Posts: 16
|
Posted: Thu Jan 07, 2010 6:47 pm Post subject: |
|
|
Thanks again pz! The "-t" option solved all my problems
One more question regarding the actual time... When using STK provide_date(), where I'm getting the date from? From the ME?
Thanks,
Diego |
|
Back to top |
|
|
pz Guest
|
Posted: Fri Jan 08, 2010 9:56 am Post subject: |
|
|
Yes, provide_date() ask ME to answer date/time. |
|
Back to top |
|
|
|