sleep command now prints out target debugmsgs w/anything like usable performance
git-svn-id: svn://svn.berlios.de/openocd/trunk@1076 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
824c270142
commit
358b472ab8
|
@ -741,7 +741,12 @@ int handle_sleep_command(struct command_context_s *cmd_ctx, char *cmd, char **ar
|
||||||
busy_sleep(duration);
|
busy_sleep(duration);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
alive_sleep(duration);
|
long long then=timeval_ms();
|
||||||
|
while ((timeval_ms()-then)<duration)
|
||||||
|
{
|
||||||
|
target_call_timer_callbacks_now();
|
||||||
|
usleep(1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
|
|
|
@ -400,14 +400,14 @@ void kept_alive()
|
||||||
void alive_sleep(int ms)
|
void alive_sleep(int ms)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<ms; i+=500)
|
int napTime=10;
|
||||||
|
for (i=0; i<ms; i+=napTime)
|
||||||
{
|
{
|
||||||
int sleep_a_bit=ms-i;
|
int sleep_a_bit=ms-i;
|
||||||
if (sleep_a_bit>500)
|
if (sleep_a_bit>napTime)
|
||||||
{
|
{
|
||||||
sleep_a_bit=500;
|
sleep_a_bit=napTime;
|
||||||
}
|
}
|
||||||
keep_alive();
|
|
||||||
usleep(sleep_a_bit*1000);
|
usleep(sleep_a_bit*1000);
|
||||||
keep_alive();
|
keep_alive();
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ proc production_test {} {
|
||||||
sleep 1000
|
sleep 1000
|
||||||
target_request debugmsgs enable
|
target_request debugmsgs enable
|
||||||
reset run
|
reset run
|
||||||
sleep 20000
|
sleep 25000
|
||||||
target_request debugmsgs disable
|
target_request debugmsgs disable
|
||||||
return "See IP address above..."
|
return "See IP address above..."
|
||||||
}
|
}
|
Loading…
Reference in New Issue