Click here to Skip to main content
16,011,374 members
Home / Discussions / C#
   

C#

 
GeneralRe: Resources Pin
Guinness4Strength4-Dec-03 10:39
Guinness4Strength4-Dec-03 10:39 
GeneralRe: Resources Pin
Guinness4Strength4-Dec-03 11:01
Guinness4Strength4-Dec-03 11:01 
GeneralRe: Resources Pin
Heath Stewart4-Dec-03 13:48
protectorHeath Stewart4-Dec-03 13:48 
GeneralRe: Resources Pin
Guinness4Strength5-Dec-03 4:16
Guinness4Strength5-Dec-03 4:16 
GeneralRe: Resources Pin
Not Active4-Dec-03 7:40
mentorNot Active4-Dec-03 7:40 
GeneralRe: Resources Pin
Guinness4Strength4-Dec-03 7:58
Guinness4Strength4-Dec-03 7:58 
GeneralRe: Resources Pin
Not Active4-Dec-03 9:16
mentorNot Active4-Dec-03 9:16 
Questionc# alarm class - implementation? Pin
AndrewCherry4-Dec-03 3:58
AndrewCherry4-Dec-03 3:58 
I'm writing a simple little c# class to simply function as an alarm - you pass it a System.DateTime with the constructor, and when that time is reached, it fires an "Alarm" event. Simple enough. However, what's the most efficient way of doing this? Currently, I have thought of two ways. The first has a timer within the class that raises it's event every second or so, and each time it checks to see whether the time now is the same as the target time (accurate to the minute essentially, which is all that's neccesary).

The second is to work out how many milliseconds is between the time the control is enabled, and the target time, and set the interval to that. With repeat turned off, this means that in theory the timer will fire when the alarm is due, which is maybe more efficient than regular comparison checking?

Are these both crazy? Which is more sensible? Is the System.Timers.Timer accurate enough to do the second option anyway?

Am i missing a very easy way of doing this that is nothing like the above? Thank you very much in advance for any comments.
AnswerRe: c# alarm class - implementation? Pin
Colin Angus Mackay4-Dec-03 4:06
Colin Angus Mackay4-Dec-03 4:06 
AnswerRe: c# alarm class - implementation? Pin
Not Active4-Dec-03 4:09
mentorNot Active4-Dec-03 4:09 
QuestionHow to capture data from the local serial port through a Aspx page situated in a Web Server ?? Pin
Nuno Silva4-Dec-03 3:58
Nuno Silva4-Dec-03 3:58 
AnswerRe: How to capture data from the local serial port through a Aspx page situated in a Web Server ?? Pin
Colin Angus Mackay4-Dec-03 4:03
Colin Angus Mackay4-Dec-03 4:03 
GeneralRe: How to capture data from the local serial port through a Aspx page situated in a Web Server ?? Pin
Nuno Silva4-Dec-03 6:10
Nuno Silva4-Dec-03 6:10 
GeneralAOP - Modifying a IMethodReturnMessage Pin
bzurer4-Dec-03 3:47
bzurer4-Dec-03 3:47 
GeneralRe: AOP - Modifying a IMethodReturnMessage Pin
Heath Stewart4-Dec-03 5:20
protectorHeath Stewart4-Dec-03 5:20 
GeneralRe: AOP - Modifying a IMethodReturnMessage Pin
bzurer4-Dec-03 10:27
bzurer4-Dec-03 10:27 
GeneralRe: AOP - Modifying a IMethodReturnMessage Pin
Heath Stewart4-Dec-03 10:50
protectorHeath Stewart4-Dec-03 10:50 
GeneralRe: AOP - Modifying a IMethodReturnMessage Pin
bzurer4-Dec-03 13:51
bzurer4-Dec-03 13:51 
GeneralRe: AOP - Modifying a IMethodReturnMessage Pin
Heath Stewart4-Dec-03 14:51
protectorHeath Stewart4-Dec-03 14:51 
GeneralRe: AOP - Modifying a IMethodReturnMessage Pin
bzurer4-Dec-03 22:29
bzurer4-Dec-03 22:29 
GeneralRe: AOP - Modifying a IMethodReturnMessage Pin
Heath Stewart5-Dec-03 3:10
protectorHeath Stewart5-Dec-03 3:10 
GeneralRe: AOP - Modifying a IMethodReturnMessage Pin
bzurer4-Dec-03 23:02
bzurer4-Dec-03 23:02 
GeneralUsing ::SendMessage in C# Pin
Andreas Philipson4-Dec-03 0:29
Andreas Philipson4-Dec-03 0:29 
GeneralRe: Using ::SendMessage in C# Pin
Heath Stewart4-Dec-03 5:04
protectorHeath Stewart4-Dec-03 5:04 
GeneralRe: Using ::SendMessage in C# Pin
Andreas Philipson4-Dec-03 5:18
Andreas Philipson4-Dec-03 5:18 

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.