Click here to Skip to main content
15,910,787 members
Home / Discussions / C#
   

C#

 
QuestionSome kind of timer.. Pin
Joplinazz11-Oct-07 10:59
Joplinazz11-Oct-07 10:59 
AnswerRe: Some kind of timer.. Pin
Pete O'Hanlon11-Oct-07 11:08
mvePete O'Hanlon11-Oct-07 11:08 
AnswerRe: Some kind of timer.. Pin
Justin Perez11-Oct-07 11:11
Justin Perez11-Oct-07 11:11 
GeneralRe: Some kind of timer.. Pin
Joplinazz11-Oct-07 11:16
Joplinazz11-Oct-07 11:16 
GeneralRe: Some kind of timer.. Pin
Justin Perez11-Oct-07 11:19
Justin Perez11-Oct-07 11:19 
GeneralRe: Some kind of timer.. Pin
Pete O'Hanlon11-Oct-07 11:28
mvePete O'Hanlon11-Oct-07 11:28 
GeneralRe: Some kind of timer.. Pin
Justin Perez11-Oct-07 11:36
Justin Perez11-Oct-07 11:36 
GeneralRe: Some kind of timer.. Pin
Pete O'Hanlon11-Oct-07 11:46
mvePete O'Hanlon11-Oct-07 11:46 
Justin Perez wrote:
I assumed that he was wanting to preform an operation multiple times within the timer, until a certain condition had been met. The most simple way to do that to me seemed to be a timer preforming the operations, and when the condition was met, do a timer.Stop().


Fair point. I read it as he wanted to get the difference between two points in time (and that was it), but you could well be right. Although my method would still work for that case because the only processing that occurs is at the button presses.

Justin Perez wrote:
Maybe I am missing something though, is it as efficent to do the above with a TimeSpan object?


There's a bit of a gotcha with a TimeSpan in that you can't go over a day. Now I know it's unlikely, but it is vaguely possible that he started the process off and then left to go on holiday for a couple of weeks. When he gets back, if he's using the DateTime it will work - a TimeSpan and it'll crash.

Deja View - the feeling that you've seen this post before.

GeneralRe: Some kind of timer.. Pin
Justin Perez11-Oct-07 11:51
Justin Perez11-Oct-07 11:51 
GeneralRe: Some kind of timer.. Pin
Pete O'Hanlon11-Oct-07 11:56
mvePete O'Hanlon11-Oct-07 11:56 
GeneralRe: Some kind of timer.. Pin
Justin Perez11-Oct-07 12:03
Justin Perez11-Oct-07 12:03 
GeneralRe: Some kind of timer.. Pin
Pete O'Hanlon11-Oct-07 12:08
mvePete O'Hanlon11-Oct-07 12:08 
GeneralRe: Some kind of timer.. Pin
Luc Pattyn11-Oct-07 13:34
sitebuilderLuc Pattyn11-Oct-07 13:34 
AnswerRe: Some kind of timer.. Pin
Ravi Bhavnani11-Oct-07 19:57
professionalRavi Bhavnani11-Oct-07 19:57 
QuestionWhere to draw? Pin
MasterSharp11-Oct-07 10:43
MasterSharp11-Oct-07 10:43 
AnswerRe: Where to draw? Pin
Christian Graus11-Oct-07 10:49
protectorChristian Graus11-Oct-07 10:49 
GeneralRe: Where to draw? Pin
MasterSharp11-Oct-07 10:53
MasterSharp11-Oct-07 10:53 
GeneralRe: Where to draw? Pin
Christian Graus11-Oct-07 10:55
protectorChristian Graus11-Oct-07 10:55 
AnswerRe: Where to draw? Pin
Giorgi Dalakishvili11-Oct-07 10:51
mentorGiorgi Dalakishvili11-Oct-07 10:51 
AnswerRe: Where to draw? Pin
Pete O'Hanlon11-Oct-07 11:04
mvePete O'Hanlon11-Oct-07 11:04 
QuestionCollision Pin
MasterSharp11-Oct-07 10:10
MasterSharp11-Oct-07 10:10 
AnswerRe: Collision Pin
Christian Graus11-Oct-07 10:34
protectorChristian Graus11-Oct-07 10:34 
GeneralRe: Collision Pin
MasterSharp11-Oct-07 10:54
MasterSharp11-Oct-07 10:54 
GeneralRe: Collision Pin
Christian Graus11-Oct-07 10:58
protectorChristian Graus11-Oct-07 10:58 
GeneralRe: Collision Pin
MasterSharp11-Oct-07 11:00
MasterSharp11-Oct-07 11:00 

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.