Click here to Skip to main content
15,914,010 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sending data thru the ethernet to a device Pin
kubben31-May-07 1:47
kubben31-May-07 1:47 
QuestionGetting the location of a users MyDocuments Pin
Gene Arnold29-May-07 6:32
Gene Arnold29-May-07 6:32 
AnswerRe: Getting the location of a users MyDocuments Pin
kubben29-May-07 6:38
kubben29-May-07 6:38 
AnswerRe: Getting the location of a users MyDocuments Pin
Dave Kreskowiak29-May-07 6:38
mveDave Kreskowiak29-May-07 6:38 
AnswerRe: Getting the location of a users MyDocuments Pin
Gene Arnold29-May-07 6:58
Gene Arnold29-May-07 6:58 
QuestionTimer Pin
MicealG29-May-07 6:06
MicealG29-May-07 6:06 
AnswerRe: Timer Pin
kubben29-May-07 6:30
kubben29-May-07 6:30 
AnswerRe: Timer Pin
Martin#29-May-07 6:31
Martin#29-May-07 6:31 
Hello,
MicealG wrote:
public void setCheckInterval(int i_checkInterval)
{
switch (i_checkInterval)
{
case 0:
_i_checkInterval = -1; break;
case 1:
_i_checkInterval = 60000; break;
case 2:
_i_checkInterval = 60000 * 3; break;
case 3:
_i_checkInterval = 60000 * 5; break;
case 4:
_i_checkInterval = 60000 * 10; break;
case 5:
_i_checkInterval = 60000 * 15; break;
case 6:
_i_checkInterval = 60000 * 20; break;
case 7:
_i_checkInterval = 60000 * 25; break;
case 8:
_i_checkInterval = 60000 * 30; break;
case 9:
_i_checkInterval = 60000 * 60; break;
}
...

What should this method tell us?
MicealG wrote:
Can anyone shed any light on the reason why when I execute the following code to set a time for 1 minute, i.e. 60000 milliseconds it takes around 3 minutes for the timer to 'tick'.

One reason could be that you use the System.Windows.Forms.Timer (Off course you do because you said 'Tick'), which runs in the UI thread.
This can be blocked from the busy UI.

If you need it more time secure you could use System.Timers.Timer or System.Threading.Timer.

Hope it helps,

All the best,

Martin
AnswerRe: Timer Pin
Dave Kreskowiak29-May-07 6:36
mveDave Kreskowiak29-May-07 6:36 
GeneralRe: Timer Pin
Martin#29-May-07 6:40
Martin#29-May-07 6:40 
GeneralRe: Timer Pin
Dave Kreskowiak29-May-07 7:02
mveDave Kreskowiak29-May-07 7:02 
AnswerRe: Timer Pin
Luc Pattyn29-May-07 9:37
sitebuilderLuc Pattyn29-May-07 9:37 
Questiondesign for a method with cyclomatic complexity issue Pin
tgrt29-May-07 5:58
tgrt29-May-07 5:58 
AnswerRe: design for a method with cyclomatic complexity issue Pin
Luc Pattyn29-May-07 9:46
sitebuilderLuc Pattyn29-May-07 9:46 
GeneralRe: design for a method with cyclomatic complexity issue Pin
tgrt29-May-07 10:29
tgrt29-May-07 10:29 
GeneralRe: design for a method with cyclomatic complexity issue Pin
Luc Pattyn29-May-07 10:52
sitebuilderLuc Pattyn29-May-07 10:52 
GeneralRe: design for a method with cyclomatic complexity issue Pin
tgrt29-May-07 11:13
tgrt29-May-07 11:13 
GeneralRe: design for a method with cyclomatic complexity issue Pin
Luc Pattyn29-May-07 12:21
sitebuilderLuc Pattyn29-May-07 12:21 
QuestionBlock Access Pin
Saiyed Alam29-May-07 5:57
Saiyed Alam29-May-07 5:57 
AnswerRe: Block Access Pin
MicealG29-May-07 6:31
MicealG29-May-07 6:31 
GeneralRe: Block Access Pin
Martin#29-May-07 6:47
Martin#29-May-07 6:47 
GeneralRe: Block Access Pin
Dave Kreskowiak29-May-07 7:08
mveDave Kreskowiak29-May-07 7:08 
GeneralRe: Block Access Pin
Martin#29-May-07 7:14
Martin#29-May-07 7:14 
AnswerRe: Block Access Pin
Dave Kreskowiak29-May-07 7:05
mveDave Kreskowiak29-May-07 7:05 
QuestionAxWebBrowser in a user control, in a MDI application Pin
dcamanni29-May-07 5:41
dcamanni29-May-07 5:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.