General

Reply

Level 2

Level 2
CBtom12
Posts: 20
Registered: ‎19-04-2012
Message 1 of 7 (263 Views)

Thread.Sleep ignored when debugging?

Am I the only one that notices this? I thought it might be worthwhile mentioning, hoping that the SDK crew picks it up.

Please use plain text.

Level 3

Level 3
Daveid
Posts: 45
Registered: ‎07-04-2009
Message 2 of 7 (241 Views)

Re: Thread.Sleep ignored when debugging?

[ Edited ]

Just tried putting Thread.Sleep(300); in my update loop and I have a very slow game now, so it's not ignored here.

 

I suggest the problem lies somewhere else :smileysurprised:

 

edit: assuming you mean in the simulator, if device it might be a device thing

Please use plain text.

Re: Thread.Sleep ignored when debugging?

It's not ignored for me either in the simulator. I don't have any idea about how it works on devices though.

Please use plain text.

Re: Thread.Sleep ignored when debugging?

We'll take a look at this in the coming week for you Ystad.
PlayStation®Mobile Dev Team
Please use plain text.

Re: Thread.Sleep ignored when debugging?

In this thread I was reporting "no problems" encountered. Thread.Sleep(num) seems to be working to me.
Please use plain text.

Re: Thread.Sleep ignored when debugging?

Sorry I meant CBtom12 :smileywink:

 

We have not been able to observe the problem on a PS Vita or in the Simulator. If you are able to provide more info on the circumstances of problem, that would be useful.

 

You could use the following to measure it

 

Stopwatch timer = new Stopwatch();

timer.Start();
Thread.Sleep(50);
timer.Stop();
Console.WriteLine("Thread slept for " + timer.ElapsedMilliseconds + "ms");
timer.Reset();

 

Thanks,

James

PlayStation®Mobile Dev Team
Please use plain text.

Level 3

Level 3
laadron
Posts: 42
Registered: ‎09-02-2013
Message 7 of 7 (37 Views)

Re: Thread.Sleep ignored when debugging?

I'm having some strange behavior with Thread.Sleep() as well - at least in the simulator. As far as I can tell, whenever I start up a new thread, any existing thread that is sleeping will break out of sleep prematurely.

Please use plain text.
Announcements

Welcome to the PlayStation Mobile Developer Forums


This is a community for the discussion of technical topics with other developers and SCE engineers. Posting ideas/requests are also appreciated. Join the discussion!

PlayStation®Mobile開発者フォーラムでは世界中の開発者の皆様と一緒に、議論や情報交換が可能です。SCEも議論に参加し、皆様の開発をサポートします。アイデアやリクエストも大歓迎です。ぜひご参加ください。

PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.

フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと PSM DevPortalを一度ログアウトし、再度ログインしてください。