Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
All right, I am using MonoDevelop to make a program in Linux, using the C# language. How can I perform a task after a given amount of milliseconds, and have it repeat the process? (Basically, the equivalent of a Timer control in MonoDevelop). I have looked for a way to do this, but haven't found it.
Posted

1 solution

Does Thread.Sleep work in the Mono version of .Net (FYI, it doesn't really matter that you're using MonoDevelop... programs developed with either MonoDevelop or Visual Studio will run under both the Microsoft .Net Framework and the Mono .Net Framework, aside from the Mono limitations)?

If it does work, then you can create a new thread, then just have it continually loop with a Thread.Sleep to help you space out processing over time.
 
Share this answer
 
Comments
drummerboy0511 14-Sep-10 20:13pm    
I tried it, it's not working.
AspDotNetDev 14-Sep-10 20:23pm    
You're gonna have to be more specific than "it's not working". What's not working, and in what way is it not working? Also, post some code so we can be sure it would normally be working in Visual Studio/Microsoft .Net Framework.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900